public Board(List<List<Square>> columns, List<List<Square>> rows) { Columns = columns; Rows = rows; CentreSquare = new BoardCoordinate((Columns.Count - 1) / 2, (Rows.Count - 1)/2); }
public void MoveSelectionUp() { if (_squareSelectable.CanSelectSquare(_board, CurrentSelectedSquare.X, CurrentSelectedSquare.Y)) { CurrentSelectedSquare = new BoardCoordinate(CurrentSelectedSquare.X, CurrentSelectedSquare.Y - 1); _squareSelector.Select(_board, CurrentSelectedSquare.X, CurrentSelectedSquare.Y); } }
public Square this[BoardCoordinate boardCoordinate] { get { return this[boardCoordinate.X, boardCoordinate.Y]; } }
public void SelectSquare(int x, int y) { if (_squareSelectable.CanSelectSquare(_board, x, y)) { CurrentSelectedSquare = new BoardCoordinate(x, y); _squareSelector.Select(_board, x, y); } }
public void Initialise() { CurrentSelectedSquare = _board.CentreSquare; _squareSelector.Select(_board, CurrentSelectedSquare.X, CurrentSelectedSquare.Y); }