package com.codegym.games.minesweeper;
import com.codegym.engine.cell.*;
public class MinesweeperGame extends Game{
private static final int SIDE=9;
private GameObject gameField[][]=new GameObject[SIDE][SIDE];
public void initialize(){
setScreenSize(SIDE,SIDE);
createGame();
}
private void createGame(){
for(int x=0;x<SIDE;x++){
for(int y=0;y<SIDE;y++){
gameField[y][x]=new GameObject(x,y);
setCellColor(x,y,Color.ORANGE);
}
}
}
}
}
Manish
Level 0
what is logic behind gameField[y][x]=new GameObject(x,y);
Archived
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
Itachi
8 August 2019, 08:02
nothing
0