MCPcopy Create free account
hub / github.com/candybox2/candybox2.github.io / playTicTacToe_testGameFull

Method playTicTacToe_testGameFull

code/main/ATree.ts:265–285  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

263 }
264
265 private playTicTacToe_testGameFull(): boolean{
266 // Variables
267 var isFull = true; // Will be set to false if there's any empty cell
268
269 // Search for any empty cell
270 for(var i = 1; i <= 3; i++){
271 for(var j = 1; j <= 3; j++){
272 if(this.ticTacToeBoard[i][j] == ATreeTicTacToeSign.NO_SIGN){
273 isFull = false;
274 break;
275 }
276 }
277 if(isFull == false) break;
278 }
279
280 // If the board is full, return true
281 if(isFull) return true;
282
283 // Else, return false
284 return false;
285 }
286
287 private playTicTacToe_testGameSomeoneWon(): ATreeTicTacToeSign{
288 // Variables

Calls

no outgoing calls

Tested by

no test coverage detected