private void SetFigureAtCell(Cell cell, Figure figure) { if (cell.CheckOnBoard()) { figures[cell.x, cell.y] = figure; } }
public Figure GetFigureAtCell(Cell cell) { if (cell.CheckOnBoard()) { return(figures[cell.x, cell.y]); } return(Figure.none); }
private bool CheckStraightMoves() { Cell currentCell = moveController.CurrentCell; do { currentCell = new Cell(currentCell.x + moveController.SignX, currentCell.y + moveController.SignY); if (currentCell == moveController.NewCell) { return(true); } } while (currentCell.CheckOnBoard() && boardController. GetFigureAtCell(currentCell) == Figure.none); return(false); }