mud.common.room
Class Room

java.lang.Object
  extended by mud.common.room.IdObject
      extended by 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.
 
Method Summary
 void addObject(GameObject o)
           
 int getHeight()
           
 GameObject getObjectById(int id)
           
 java.util.Set<GameObject> getObjects()
           
 GameTile getTile(int x, int y)
           
 int getWidth()
           
 void removeObject(GameObject o)
           
 XmlElement toXml()
           
 
Methods inherited from class mud.common.room.IdObject
getId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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.
Method Detail

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()