コード例 #1
0
ファイル: Board.cs プロジェクト: GeorgiAnchev/Chess-game
        public MoveOutcome TryTake(Move move)
        {
            Piece currentPiece = board[move.CurrentRow, move.CurrentCol];

            if (currentPiece.CanAttackPosition(move, this))
            {
                TakePiece(move);
            }
            else
            {
                return(MoveOutcome.Illegal);
            }

            return(MoveOutcome.Success);
        }