Skip to content

Commit

Permalink
Progress before changing timer
Browse files Browse the repository at this point in the history
  • Loading branch information
bcrebel committed May 5, 2018
1 parent efebfbc commit 686c742
Showing 1 changed file with 34 additions and 4 deletions.
38 changes: 34 additions & 4 deletions src/components/Game/Cards.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,44 @@ import styles from './Game.scss'
import Timer from '../Timer/Timer'


class Start extends React.Component {
constructor(props) {
super(props)
}

render() {
const greeting = this.props.newPlayer ? 'Ready for Another Round?' : 'Welcome to Memory!'
const Time = (
<div>
<p>Lowest Time</p>
<p>{this.props.lowestTime}</p>
</div>
)

return (
<div>
<h1>{greeting}</h1>
{this.props.lowestTime && Time}
<p>Choose your level</p>
<button>Easy</button>
<button>Hard</button>
</div>
)
}
}

class Card extends React.Component {
constructor(props) {
super(props)
}

render() {

return (<li type={this.props.type} id={this.props.id} onClick={this.props.onClick} className={this.props.className}>
{this.props.children}
</li>)
return (
<li type={this.props.type} id={this.props.id} onClick={this.props.onClick} className={this.props.className}>
{this.props.children}
</li>
)
}
}

Expand Down Expand Up @@ -123,7 +151,9 @@ class CardContainer extends React.Component {
render() {
return (
<div style={{position: 'relative'}}>
<div style={this.state.gameStarted ? {display: 'none'} : {display: 'block'}} className={styles.start} onClick={this.formatBoard} />
<div style={this.state.gameStarted ? {display: 'none'} : {display: 'block'}} className={styles.start} onClick={this.formatBoard}>
<Start newPlayer={this.state.gameStarted} lowestTime='0:34'/>
</div>
<h1 className={styles.header}>NYT Games Code Test</h1>
<div className={styles.intro}>
<Timer />
Expand Down

0 comments on commit 686c742

Please sign in to comment.