Skip to content

Commit

Permalink
v1.3.2
Browse files Browse the repository at this point in the history
- Now displays version number on the intro page of the game.
- Updated WIn / Lose messages (better readablilty)

1.3.2
  • Loading branch information
withoutwax committed Sep 1, 2019
1 parent 5e2cedc commit 936c898
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "liar-game",
"version": "1.3.1",
"version": "1.3.2",
"private": true,
"homepage": "https://withoutwax.github.io/Liar-Game/",
"dependencies": {
Expand Down
21 changes: 8 additions & 13 deletions src/Components/Finish.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class Finish extends React.Component {
liarStatus: this.props.liarStatus,
vocab: this.props.vocab,
theme: this.props.theme,
// guessWords: [],
liarGuess: false,
liarGuessText: "",
headerText: "라이어는 단어를 선택해주세요",
Expand All @@ -19,31 +18,27 @@ class Finish extends React.Component {
}

componentDidMount = () => {
if (this.state.liarStatus === "found"){
// let data = this.state.selectData // Currently only set to Korean
// console.log(data);
// this.setState({guessWords: this.state.guessWords.concat(data)});
} else {
if (this.state.liarStatus !== "found"){
console.log("Could not find liar");
this.setState({
headerText: "축하합니다. 라이어를 잡았습니다!",
headerText: "라이어를 찾지 못하였습니다! 라이어가 승리하였습니다!",
liarGuess: true
});
}

}
}

liarGuess = (guess) => {
console.log(guess.target.value, this.state.vocab);
if (guess.target.value === this.state.vocab) {
this.setState({
liarGuessText: "축하합니다! 선택한 단어가 맞습니다!",
headerText: "라이어 승",
liarGuessText: "선택한 단어가 맞습니다!",
headerText: "라이어가 승리하였습니다!",
liarWin: true
});
} else {
this.setState({
liarGuessText: `아쉽습니다! 선택한 단어가 틀렸습니다! 선택된 단어는: ${this.state.vocab}`,
headerText: "라이어 패",
liarGuessText: `틀렸습니다! 선택된 단어는: ${this.state.vocab}`,
headerText: "라이어가 패하였습니다!",
liarWin: false
});
}
Expand Down
2 changes: 2 additions & 0 deletions src/Components/Intro.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import "../scss/Intro.scss";
import PackageJson from '../../package.json';

import { Link } from 'react-router-dom';

Expand Down Expand Up @@ -38,6 +39,7 @@ class Intro extends React.Component {
{this.state.easterEggMode ? <input className="easterEggInput" placeholder="코드를 입력하세요" onChange={this.specialCode}></input> : ''}
{this.state.codeActivated ? <p className="green">{this.state.codeActivatedText}</p> : ''}
<Link to='/setting'>게임하기</Link>
<p className="version">version v{PackageJson.version}</p>
</section>
);
}
Expand Down
4 changes: 4 additions & 0 deletions src/scss/Intro.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@
padding: 1em;
border: 1px solid $light-blue;
}
.version {
margin-top: 5em;
font-size: 1rem;
}
}

0 comments on commit 936c898

Please sign in to comment.