コード例 #1
0
    public float Evaluate(IGameState state)
    {
        TTTBoard board = (TTTBoard)state;

        if (board.Winner(player))
        {
            return(maxValue);
        }
        else if (board.Loser(player))
        {
            return(minValue);
        }
        else
        {
            return(0);
        }
    }