private void BuildAllTiles(MultiplayerGameScreen GameScreen, ImageHandler GameImageHandler) { int TileCounter = 0; for (int i = 0; i < 15; i++) { for (int j = 0; j < 15; j++) { GameImageHandler.BuildNewTile("-"); //creates a new tile GameImageHandler.MoveATile(TileCounter, 10 + i * 40, 10 + j * 40); //moves the tile to its position on the board TileCounter++; //increase the tile counter so that the next tile to be created can be referenced and translated }//loop for each row }//loop for each col }//builds all the tiles to create the game board
/// <summary> /// This fuction tells the game image handler to generate all the tiles in the game /// for every coordinate. it also then tell it to build the backround highlight tile. /// </summary> /// <param name="GameScreen"></param> /// <param name="GameImageHandler"></param> private void BuildAllTiles(GameScreen GameScreen, ImageHandler GameImageHandler) { int TileCounter = 0;//Defines and set TileCounter to 0 for (int i = 0; i < 15; i++) { for (int j = 0; j < 15; j++) { GameImageHandler.BuildNewTile("-"); //creates a new tile GameImageHandler.MoveATile(TileCounter, 20 + i * 40, 20 + j * 40); //moves the tile to its position on the board TileCounter++; //increase the tile counter so that the next tile to be created can be referenced and translated }//loop for each row }//loop for each col GameImageHandler.BuildHighlightTile();//Builds the HighlightTile }