示例#1
0
        public override bool Equals(object obj)
        {
            if (!(obj is TicTacToeToken))
            {
                return(false);
            }

            TicTacToeToken other = (TicTacToeToken)obj;

            return(Equals(Name, other.Name));
        }
示例#2
0
 private static Player <TicTacToeToken> GetPlayer(string arg, TicTacToeToken token)
 {
     if (arg.Contains("ai", StringComparison.InvariantCultureIgnoreCase))
     {
         return(new MinimaxTicTacToePlayer("player-1 (AI)", token));
     }
     else
     {
         return(new HumanTicTacToePlayer($"player-1 ({arg})", token));
     }
 }