예제 #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);
 }