Skip to content

Commit

Permalink
Fix early finish bug
Browse files Browse the repository at this point in the history
Fix #18
  • Loading branch information
iimog committed Feb 8, 2020
1 parent 4869f2f commit 1b8a25f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class LeaderboardScreen extends React.Component<{navigation, dispatch, players:
const gameIndex = this.props.rounds.length-1;
const gameRunning = gameIndex >= 0 && this.props.rounds[gameIndex].winner == -1;
let playerScores = this.getPlayerScores();
let isOver = this.props.rounds.length >= this.props.games.length;
let isOver = this.props.rounds.length >= this.props.games.length && !gameRunning;
let sortedPlayers = this.props.players.sort((x,y) => playerScores[y.name]-playerScores[x.name])
let lastScore = -1;
let tieIndex = -1;
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ The app is built using a collection of open source libraries including

## Change Log

### next release
- fix early finish bug [#18](https://github.com/iimog/x-game-master/issues/18)

### 0.3.1
- game state persists restarts of the app

### 0.3.0
- simplified design and game play
- complete re-write from <=0.2.1

0 comments on commit 1b8a25f

Please sign in to comment.