(xIndex: number, yIndex: number)
| 348 | } |
| 349 | |
| 350 | private playTicTacToeSign(xIndex: number, yIndex: number): void{ |
| 351 | // Add the sign |
| 352 | this.ticTacToeBoard[xIndex][yIndex] = ATreeTicTacToeSign.X; |
| 353 | |
| 354 | // Test end game conditions (we only make the squirrel play if nothing happens) |
| 355 | if(this.playTicTacToe_testEndGameConditions() == false){ |
| 356 | // IA |
| 357 | var bestPosition: Pos = this.playTicTacToe_minimax(this.ticTacToeBoard, ATreeTicTacToeSign.O).bestPosition; |
| 358 | this.ticTacToeBoard[bestPosition.x][bestPosition.y] = ATreeTicTacToeSign.O; |
| 359 | // Test end game conditions |
| 360 | this.playTicTacToe_testEndGameConditions(); |
| 361 | } |
| 362 | |
| 363 | // Update |
| 364 | this.update(); |
| 365 | this.getGame().updatePlace(); |
| 366 | } |
| 367 | |
| 368 | private reward1(): void{ |
| 369 | this.getGame().getCandies().add(20); |
nothing calls this directly
no test coverage detected