public override int GetHashCode() { int hash = 1; if (Uid != 0L) { hash ^= Uid.GetHashCode(); } if (PlayerID != 0) { hash ^= PlayerID.GetHashCode(); } if (PlayerName.Length != 0) { hash ^= PlayerName.GetHashCode(); } if (Score != 0) { hash ^= Score.GetHashCode(); } if (IsAI != false) { hash ^= IsAI.GetHashCode(); } if (IsOut != false) { hash ^= IsOut.GetHashCode(); } return(hash); }
public MainWindow() { InitializeComponent(); IsAI.Add(TakPiece.PieceColor.Black, false); IsAI.Add(TakPiece.PieceColor.White, false); AIs.Add(TakPiece.PieceColor.Black, new PlayerAI(TakPiece.PieceColor.Black, new GameState(new TakBoard(3)))); AIs.Add(TakPiece.PieceColor.White, new PlayerAI(TakPiece.PieceColor.White, new GameState(new TakBoard(3)))); DebugArea = DebugTrace; }
public override string ToString() { var sb = new ExtendedStringBuilder(true, ','); sb.Append(Name); sb.Append(SideId); sb.Append(StartingLocation); sb.Append(ColorId); sb.Append(TeamId); sb.Append(AILevel); sb.Append(IsAI.ToString()); sb.Append(Index); return(sb.ToString()); }