Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 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);
     }
 }
Esempio n. 3
0
 public Square this[BoardCoordinate boardCoordinate]
 {
     get { return this[boardCoordinate.X, boardCoordinate.Y]; }
 }
Esempio n. 4
0
 public void SelectSquare(int x, int y)
 {
     if (_squareSelectable.CanSelectSquare(_board, x, y))
     {
         CurrentSelectedSquare = new BoardCoordinate(x, y);
         _squareSelector.Select(_board, x, y);
     }
 }
Esempio n. 5
0
 public void Initialise()
 {
     CurrentSelectedSquare = _board.CentreSquare;
     _squareSelector.Select(_board, CurrentSelectedSquare.X, CurrentSelectedSquare.Y);
 }