Skip to content

Commit

Permalink
add "waiting for opponent to place all handicap stones" message
Browse files Browse the repository at this point in the history
sometimes human players forget it is a handicap game,
and sometimes they even leave the game in their confusion
  • Loading branch information
wonderingabout committed Feb 5, 2019
1 parent e728540 commit b5bf604
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions game.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ class Game {
// If we are white, we wait for opponent to make extra moves.
if (this.bot) this.bot.sendMove(decodeMoves(move.move, this.state.width)[0], this.state.width, this.my_color == "black" ? "white" : "black");
if (config.DEBUG) this.log("Waiting for opponent to finish", this.state.handicap - this.state.moves.length, "more handicap moves");
if (this.state.moves.length ===1) { // remind once, avoid spamming the reminder
this.sendChat("Waiting for opponent to place all handicap stones"); // reminding human player in ingame chat
}
}
} else {
if (move.move_number % 2 == this.opponent_evenodd) {
Expand Down

0 comments on commit b5bf604

Please sign in to comment.