예제 #1
0
 private void MoveFigure(string start, string end, Figure figure)
 {
     board[start[0]][start[1]] = null;
     board[end[0]]  [end[1]]   = figure;
 }
예제 #2
0
        private bool TryMove(string start, string end, Func <Board, string, string, bool> checkMethod, Figure figure)
        {
            if (!checkMethod(this, start, end))
            {
                return(false);
            }

            // меняем позицию фигуры на доске
            MoveFigure(start, end, figure);
            return(true);
        }