示例#1
0
        public bool isCellVulnerableAfterMove(GameCell fromCell, GameCell toCell, Piece.PlayerColour opposingColour)
        {
            Piece pieceToMove   = fromCell.Piece;
            Piece pieceAtToCell = toCell.Piece;

            MovePieceOnBoard(fromCell, toCell);

            bool isVulnerable = isCellVulnerable(toCell, opposingColour);

            fromCell.Piece = pieceToMove;
            toCell.Piece   = pieceAtToCell;

            return(isVulnerable);
        }
示例#2
0
 private void MovePieceOnBoard(GameCell fromCell, GameCell toCell)
 {
     toCell.Piece = fromCell.Piece;
     EmptyCell(fromCell);
 }
示例#3
0
 private void MovePiece(GameCell fromCell, GameCell toCell)
 {
     fromCell.Piece.RegisterMove(toCell);
     MovePieceOnBoard(fromCell, toCell);
     FirePieceMovedEvent(toCell);
 }