Skip to content

Commit

Permalink
Move greeting to be sent before bot engine is started.
Browse files Browse the repository at this point in the history
  • Loading branch information
eatnow committed Jul 14, 2019
1 parent 2be8d4e commit fe11699
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions game.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,6 @@ class Game {
'move': encodeMove(move)
}));
//this.sendChat("Test chat message, my move #" + move_number + " is: " + move.text, move_number, "malkovich");
if( config.greeting && !this.greeted && this.state.moves.length < (2 + this.state.handicap) ){
this.sendChat( config.GREETING, "discussion");
this.greeted = true;
}
} /* }}} */

// Get move from bot and upload to server.
Expand All @@ -378,6 +374,10 @@ class Game {
return;
if (this.state.phase !== 'play')
return;
if( config.greeting && !this.greeted && this.state.moves.length < (2 + this.state.handicap) ){
this.sendChat( config.GREETING, "discussion");
this.greeted = true;
}

let doing_handicap = (this.state.free_handicap_placement && this.state.handicap > 1 &&
this.state.moves.length < this.state.handicap);
Expand Down

0 comments on commit fe11699

Please sign in to comment.