public GameAreaForm(GameControler gameControler, GameData data) { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); this.gameControler = gameControler; this.data = data; labelTurn.Hide(); imageHolder = new ImageHolder(new System.ComponentModel .ComponentResourceManager(typeof(GameAreaForm))); myBombs = new BombPicture[myBoard.getGridSize(), myBoard.getGridSize()]; enemyBombs = new BombPicture[enemyBoard.getGridSize(), enemyBoard.getGridSize()]; for (int i = 0; i < myBoard.getGridSize(); i++) { for (int j = 0; j < myBoard.getGridSize(); j++) { Coords coords = myBoard.getGridCoords(i, j); myBombs[i, j] = new BombPicture (coords.X + myBoard.Location.X, coords.Y + myBoard.Location.Y, imageHolder); this.Controls.Add(myBombs[i, j]); coords = enemyBoard.getGridCoords(i, j); enemyBombs[i, j] = new BombPicture (coords.X + enemyBoard.Location.X, coords.Y + enemyBoard.Location.Y, imageHolder); this.Controls.Add(enemyBombs[i, j]); } } myBoard.SendToBack(); enemyBoard.SendToBack(); //test the drawing of bombpictures //data.setMyBoxState(5,5, GameData.BoxState.BOMBED); //data.setEnemyBoxState(7,7, GameData.BoxState.MISSED); }