internal void PutFigureOnPositionWithoutMovingItActualy(ChessBoardPosition positionOnTheBoard, IFigure figure) { if (figure == null) { throw new ArgumentNullException(nameof(figure)); } this.board[8 - positionOnTheBoard.Vertical, positionOnTheBoard.Horizontal - 'a'] = figure; }
internal void PutFigureOnPosition(ChessBoardPosition positionOnTheBoard, IFigure figure) { if (figure == null) { throw new ArgumentNullException(nameof(figure)); } this.board[8 - positionOnTheBoard.Vertical, positionOnTheBoard.Horizontal - 'a'] = figure; if (figure is ICastleableFigure) { ((ICastleableFigure)figure).Move(); } }
internal IFigure GetFigureOnPosition(ChessBoardPosition positionOnTheBoard) { return(this.board[8 - positionOnTheBoard.Vertical, positionOnTheBoard.Horizontal - 'a']); }
internal void RemoveFigureOnPosition(ChessBoardPosition positionOnTheBoard) { this.board[8 - positionOnTheBoard.Vertical, positionOnTheBoard.Horizontal - 'a'] = null; }