Skip to content

Commit

Permalink
fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
codegard1 committed Jul 14, 2017
1 parent 77eae18 commit 9b22448
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ export class Table extends Component {
}

// set next game status.
// if higher than 2, _exitTrap() will catch it
// if higher than 2, _exitTrap() will catch it and re-run _evaluateGame()
switch (currentPlayerStatus) {
case D.busted:
nextGameStatus = 3;
Expand All @@ -449,9 +449,9 @@ export class Table extends Component {
nextGameStatus = 4;
break;

case D.blackjack:
nextGameStatus = 5;
break;
// case D.blackjack:
// nextGameStatus = 5;
// break;

default:
//do nothing
Expand Down Expand Up @@ -547,7 +547,8 @@ export class Table extends Component {
break;

case 4: // currentPlayer Wins
messageText = `${this.state.players[this.state.currentPlayer].title} wins!`;
const winningPlayerTitle = this.state.players[winningPlayerIndex].title;
messageText = `${winningPlayerTitle} wins!`;
this._showMessageBar(messageText, MessageBarType.success);
nextGameStatus = 0;

Expand All @@ -567,14 +568,13 @@ export class Table extends Component {

case 5: // human player blackjack
this._showMessageBar("Blackjack!", MessageBarType.success);
nextGameStatus = 0;

// don't do payout unless all players are staying and not busted
if (!allPlayersBusted) {
this._payout();
}

nextGameStatus = 0;

this.setState(
{
turnCount: this.state.turnCount + 1,
Expand All @@ -597,6 +597,8 @@ export class Table extends Component {
case 7: // non-human player wins
this._showMessageBar(`${players[1].title} wins!`);

nextGameStatus = 0;

// don't do payout unless all players are staying and not busted
if (!allPlayersBusted) {
this._payout();
Expand Down Expand Up @@ -716,7 +718,7 @@ export class Table extends Component {

this.setState(
{ players, pot },
this._showMessageBar(`Ante: ${amount}`, MessageBarType.info)
this._showMessageBar(`Ante: $${amount}`, MessageBarType.info)
);
}

Expand Down

0 comments on commit 9b22448

Please sign in to comment.