com.ltu.smd116.containers
Class Floor
- public class Floor
Floor is a container for keeping track of the different floors on
board the cruise liner
- Author:
- Veronica Backlund
Constructor Summary |
Floor(Tile [] [] tiles) The constructor for a certain floor, with its tiles |
Method Summary |
void | draw(Graphics g, int w, int h) Draws the floor |
(package private) Tile | getTile(int x, int y) Gets a tile |
(package private) void | setTile(int x, int y, Tile tile) Sets a specific tile on the floor |
height
private int height
tiles
private Tile [] [] tiles
width
private int width
Floor
public Floor(Tile [] [] tiles)
- The constructor for a certain floor, with its tiles
- Parameters:
- tiles - The floor's tiles
draw
public void draw(Graphics g, int w, int h)
- Draws the floor
getTile
Tile getTile(int x, int y)
- Gets a tile
setTile
void setTile(int x, int y, Tile tile)
- Sets a specific tile on the floor
- Parameters:
- x - The x-position
- y - The y-point
- tile - The tile to change