protected override MoveValuation EvaluateMove(int choice) { int currentPoints = this.gameData.CountPoints(this.playerId); Game.Engine.Game afterTurn = this.gameData.Clone(); afterTurn.ChooseTurn(choice, this.playerId); int afterPoints = afterTurn.CountPoints(this.playerId); return(new MoveValuation() { Choice = choice, Weight = afterPoints - currentPoints, }); }
protected override MoveValuation EvaluateMove(int choice) { Game.Engine.Game afterMove = this.gameData.Clone(); afterMove.ChooseTurn(choice, this.playerId); if (afterMove.GameOver && IWin(afterMove)) { return(new MoveValuation() { Choice = choice, Weight = 100 }); } return(new MoveValuation() { Choice = choice, Weight = 0 }); }