comment world class
This commit is contained in:
parent
f76b6cb4ab
commit
62f3b5cc07
|
|
@ -1,18 +1,23 @@
|
|||
package backend;
|
||||
import java.util.Random;
|
||||
|
||||
// Here we will deal with the grid setup
|
||||
|
||||
public class World {
|
||||
//this part is to randomly create a grid.
|
||||
Random randGen = new Random();
|
||||
Teleporter teleportX ;
|
||||
Teleporter teleportY ;
|
||||
|
||||
// 2D array representing the state of the world
|
||||
private int[][] currentWorld;
|
||||
public World(int width, int height) {
|
||||
// set up the size of the grid
|
||||
public World(int width, int height) {
|
||||
currentWorld = new int[width][height];
|
||||
this.teleportX = new Teleporter(width);
|
||||
this.teleportY = new Teleporter(height);
|
||||
}
|
||||
//method to
|
||||
public void randomizer(double randValue) {
|
||||
for (int i =0; i < currentWorld.length; i++) {
|
||||
for (int j =0; j < currentWorld[i].length; j++) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue