public class Level
extends java.lang.Object
| Modifier and Type | Class | Description | 
|---|---|---|
static class  | 
Level.Entity | 
 Represents state of a game level cell. 
 | 
| Modifier and Type | Field | Description | 
|---|---|---|
java.lang.String | 
name | 
 Level's name. 
 | 
int | 
numberOfBoxes | 
 Number of boxes on the level. 
 | 
int | 
numberOfDoneBoxes | 
 Number of boxes placed in the sockets. 
 | 
int | 
numberOfSockets | 
 Number of empty sockets. 
 | 
int | 
playerXStart | 
 X coordinate of player's start point. 
 | 
int | 
playerYStart | 
 Y coordinate of player's start point. 
 | 
| Constructor | Description | 
|---|---|
Level(int width,
     int height) | 
 Creates empty level of given size with an empty name. 
 | 
Level(int width,
     int height,
     java.lang.String name) | 
 Creates empty level of given size and name. 
 | 
| Modifier and Type | Method | Description | 
|---|---|---|
Level.Entity | 
getEntity(int x,
         int y) | 
 Returns state of a specified entity 
 | 
int | 
getHeight() | 
 Getter of level's height. 
 | 
int | 
getWidth() | 
 Getter of level's width. 
 | 
void | 
setEntity(int x,
         int y,
         Level.Entity newEntityType) | 
 Sets state of a specified entity 
 | 
public java.lang.String name
public int playerXStart
public int playerYStart
public int numberOfBoxes
public int numberOfDoneBoxes
public int numberOfSockets
public Level(int width,
             int height,
             java.lang.String name)
width - Width of the new level.height - Height of the new level.name - Name of the new level.public Level(int width,
             int height)
width - Width of the new level.height - Height of the new level.public void setEntity(int x,
                      int y,
                      Level.Entity newEntityType)
x - X coordinate of the entity to be changed.y - Y coordinate of the entity to be changed.newEntityType - Value to be set.public Level.Entity getEntity(int x, int y)
x - X coordinate of the entity.y - Y coordinate of the entity.public int getWidth()
public int getHeight()