public void EditClearPieces() { WhitePlayer.Pieces.Clear(); BlackPlayer.Pieces.Clear(); Board.ClearPieces(); AddPiece(File.E, Rank._1, new King(Color.White)); WhitePlayer.King = (King)WhitePlayer.Pieces.Single(x => x is King); AddPiece(File.E, Rank._8, new King(Color.Black)); BlackPlayer.King = (King)BlackPlayer.Pieces.Single(x => x is King); }
internal void Reset() { EnPassantFile = null; WhitePlayer.Material = 0; BlackPlayer.Material = 0; Ended = false; IsStaleMate = false; Winner = null; WhitePlayer.Pieces.Clear(); BlackPlayer.Pieces.Clear(); Board.ClearPieces(); HashHistory.Clear(); CommandCount = 0; BlackPlayer.Moves.Clear(); WhitePlayer.Moves.Clear(); MovesSinceLastCaptureOrPawnMove = 0; PositionsDatabase.Instance.Reset(); }
internal void Reset() { WhitePlayer.HasCastledKingSide = false; WhitePlayer.HasCastledQueenSide = false; BlackPlayer.HasCastledKingSide = false; BlackPlayer.HasCastledQueenSide = false; EnPassantFile = null; WhitePlayer.Material = 0; BlackPlayer.Material = 0; Ended = false; IsStaleMate = false; Winner = null; WhitePlayer.Pieces.Clear(); BlackPlayer.Pieces.Clear(); Board.ClearPieces(); HashHistory.Clear(); CommandCount = 0; BlackPlayer.Moves.Clear(); WhitePlayer.Moves.Clear(); PositionsDatabase.Instance.Reset(); }