public class Level
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static int |
code |
private Game |
game |
static int |
HEIGHT |
private int |
numItems |
private Tile[][] |
plan |
private char[][] |
tiles |
private int |
totNumItems |
static int |
WIDTH |
Constructor and Description |
---|
Level(Game game,
char[][] levelRep,
int code)
Constructor for the class
|
Modifier and Type | Method and Description |
---|---|
void |
draw(java.awt.Graphics g)
Draw Method to draw everything.
|
int |
getCode()
Getter for level Code
|
int |
getNumItems()
Getter for numItems
|
Tile[][] |
getPlan()
Getter for plan
|
char[][] |
getTiles()
Getter for tiles
|
int |
getTotNumItems()
Getter for totNumItems
|
void |
setNumItems(int numItems)
Setter for numItems
|
void |
setTiles(char[][] tiles)
Setter for tiles
|
public static final int WIDTH
public static final int HEIGHT
private static int code
private Tile[][] plan
private char[][] tiles
private Game game
private int totNumItems
private int numItems
public Level(Game game, char[][] levelRep, int code)
game
- Game objectlevelRep
- level representation array charcode
- level code (1 or 2)public void draw(java.awt.Graphics g)
g
- Graphics objectpublic int getNumItems()
public int getTotNumItems()
public void setNumItems(int numItems)
numItems
- number of items leftpublic Tile[][] getPlan()
public char[][] getTiles()
public void setTiles(char[][] tiles)
tiles
- char [][]public int getCode()