com.ltu.smd116.containers
Class Tile
- public class Tile
This class describes how a tile is represented
- Author:
- Marie Larsson
Constructor Summary |
Tile(int type, int leftWall, int topWall) Constructs a tile with a leftWall and a topWall |
F_CORRIDOR
public final static int F_CORRIDOR
F_DECK
public final static int F_DECK
F_ELEVATOR
public final static int F_ELEVATOR
F_NONE
public final static int F_NONE
F_RESTRICTED
public final static int F_RESTRICTED
F_ROOM
public final static int F_ROOM
F_SHOP
public final static int F_SHOP
F_STAIR_DN
public final static int F_STAIR_DN
F_STAIR_UP
public final static int F_STAIR_UP
floorColors
private final static Color[] floorColors
leftWall
private int leftWall
- Indicates the position of the tile's leftWall
topWall
private int topWall
- Indicates the position of the tile's topWall
type
private int type
- Describe what type the tile is
W_DOOR
public final static int W_DOOR
W_NONE
public final static int W_NONE
W_OWALL
public final static int W_OWALL
W_WALL
public final static int W_WALL
Tile
public Tile(int type, int leftWall, int topWall)
- Constructs a tile with a leftWall and a topWall
- Parameters:
- type - The type of the tile
- leftWall - The aft side of the tile
- topWall - The port side of the tile
draw
void draw(Graphics g, int x, int y, int w, int h)
- Draws the tile
getLeftWall
public int getLeftWall()
getTopWall
public int getTopWall()
getType
public int getType()
to Class java.awt.Color