public override bool Equals(object obj) { if (!(obj is TicTacToeToken)) { return(false); } TicTacToeToken other = (TicTacToeToken)obj; return(Equals(Name, other.Name)); }
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)); } }