Esempio n. 1
0
 public void GridButton_ColSetCorrectly()
 {
     int col = 4;
     _gridButton = new GridButton(_gameState, 0, col);
     Assert.AreEqual(col, _gridButton.Column);
 }
Esempio n. 2
0
 public void GridButton_RowSetCorrectly()
 {
     int row = 4;
     _gridButton = new GridButton(_gameState, row, 0);
     Assert.AreEqual(row, _gridButton.Row);
 }
Esempio n. 3
0
 /// <summary>
 /// Sets up the grid of buttons for the PokemonBoard. 
 /// </summary>
 private void setUpGridBoard()
 {
     double buttonHeight = GridBoard.Height / PokemonBoard.gridSize;
     double buttonWidth = GridBoard.Width / PokemonBoard.gridSize;
     for (int row = 0; row < PokemonBoard.gridSize; row++)
     {
         for (int col = 0; col < PokemonBoard.gridSize; col++)
         {
             GridButton newButton = new GridButton(_gameState, row, col);
             newButton.Height = buttonHeight;
             newButton.Width = buttonWidth;
             GridBoard.Children.Add(newButton);
         }
     }
 }