diff --git a/src/components/Footer/Footer.jsx b/src/components/Footer/Footer.jsx index a5fc742..a7b08e9 100644 --- a/src/components/Footer/Footer.jsx +++ b/src/components/Footer/Footer.jsx @@ -14,6 +14,7 @@ class Footer extends Component {

Updates

+ 27 March 2017 · Bufix: Allow mobile browsers to change a locked stage number.
24 March 2017 · Enhancement: Improved mobile browser usability with reduced margins.
18 March 2017 · Bugfix: Fixed unintended behavior when same group was selected from both hiragana & katakana. Thanks for the bug report!

diff --git a/src/components/Game/ShowStage.jsx b/src/components/Game/ShowStage.jsx index 26012d5..6c22eda 100644 --- a/src/components/Game/ShowStage.jsx +++ b/src/components/Game/ShowStage.jsx @@ -21,17 +21,17 @@ class ShowStage extends Component { showStage() { let stageDescription; let stageSecondaryDescription = false; - if(this.props.stage===1) stageDescription = 'Choose one'; - if(this.props.stage===2) { stageDescription = 'Choose one'; stageSecondaryDescription = 'Reverse'; } - if(this.props.stage===3) stageDescription = 'Write the answer'; - if(this.props.stage===4) { stageDescription = 'Write the answer'; stageSecondaryDescription = 'Three at once'; } + if(this.props.stage==1) stageDescription = 'Choose one'; + if(this.props.stage==2) { stageDescription = 'Choose one'; stageSecondaryDescription = 'Reverse'; } + if(this.props.stage==3) stageDescription = 'Write the answer'; + if(this.props.stage==4) { stageDescription = 'Write the answer'; stageSecondaryDescription = 'Three at once'; } let stageContent = (

Stage {this.props.stage}

{stageDescription}

{stageSecondaryDescription?

{stageSecondaryDescription}

:''}
); - if(this.props.stage===5) { + if(this.props.stage==5) { stageContent = (

Congratulations!

You have passed all 4 stages.

diff --git a/src/components/GameContainer/GameContainer.jsx b/src/components/GameContainer/GameContainer.jsx index ebe4134..779a6c3 100644 --- a/src/components/GameContainer/GameContainer.jsx +++ b/src/components/GameContainer/GameContainer.jsx @@ -17,6 +17,11 @@ class GameContainer extends Component { } startGame(decidedGroups) { + if(parseInt(this.state.stage)<1 || isNaN(parseInt(this.state.stage))) + this.setState({stage: 1}); + else if(parseInt(this.state.stage)>4) + this.setState({stage: 4}); + this.setState({decidedGroups: decidedGroups}); this.props.handleStartGame(); } @@ -26,8 +31,7 @@ class GameContainer extends Component { } lockStage(stage, forceLock) { - stage = parseInt(stage) || 1; - if(stage<1 || stage>4) stage=1; + // if(stage<1 || stage>4) stage=1; // don't use this to allow backspace if(forceLock) this.setState({stage: stage, isLocked: true}); else