Esempio n. 1
0
        protected bool IsOccupiedByOtherColorPiece(Board board, PiecePosition position)
        {
            var newPiece = board.GetPiece(position);

            return(newPiece != null && newPiece?.Color != Color);
        }
Esempio n. 2
0
        protected bool IsOccupiedBySameColorPiece(Board board, PiecePosition position)
        {
            var newPiece = board.GetPiece(position);

            return(newPiece?.Color == Color);
        }