]> git.cworth.org Git - empires-server/commitdiff
tictactoe: Reword the comment describing the add_move method
authorCarl Worth <cworth@cworth.org>
Mon, 1 Jun 2020 21:32:50 +0000 (14:32 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 1 Jun 2020 21:32:50 +0000 (14:32 -0700)
The former wording was just a little vague and potentially
ambiguous. It's now more clear about when a true value is returned,
and when false is returned.

tictactoe.js

index a60eed600c9bdccde3736d56bf2b988dd1a9e892..d5a07b25506b79618993ed9ec67befb6ee289936 100644 (file)
@@ -11,7 +11,7 @@ class TicTacToe extends Game {
     };
   }
 
-  /* Returns Boolean indicating whether move was legal and added. */
+  /* Returns true if move was legal and added, false otherwise. */
   add_move(square) {
     /* Cannot move to an occupied square. */
     if (this.state.board[square])