mud.common.room
Class Room
java.lang.Object
mud.common.room.IdObject
mud.common.room.Room
public class Room
- extends IdObject
Implements a single game room.
- Author:
- Pieter van Ede
Constructor Summary |
Room(int id,
GameTile[][] tiles)
Makes a new game room with the specified tables and objects. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Room
public Room(int id,
GameTile[][] tiles)
- Makes a new game room with the specified tables and objects.
- Parameters:
tiles
- all the tiles in the room, where the first dimension is x and
the second is y.objects
- a list of all game objects in the room.
addObject
public void addObject(GameObject o)
removeObject
public void removeObject(GameObject o)
getWidth
public int getWidth()
getHeight
public int getHeight()
getObjects
public java.util.Set<GameObject> getObjects()
getObjectById
public GameObject getObjectById(int id)
getTile
public GameTile getTile(int x,
int y)
toXml
public XmlElement toXml()