test.android.worldofzuul
Class Room

java.lang.Object
  extended by test.android.worldofzuul.Room

public class Room
extends java.lang.Object

A room describes the current environment. Only one room can be displayed at one time.


Constructor Summary
Room(double w, double h, double d, java.lang.String desc)
          Constructor for objects of class Room
 
Method Summary
 void addBlock(Block block)
          Add a block to this room.
 java.util.ArrayList<Block> getBlocks()
          Get the block
 double getDepth()
          Accessor for room's dimension
 java.lang.String getDescription()
          Get the description of the room
 Room getExit(java.lang.String direction)
          Get the room a direction exits to.
 double getWidth()
          Accessor for the room's dimension
 void setExit(java.lang.String direction, Room room)
          Create an exit to a room
 void setTextureEast(java.lang.String fileName)
          Mutator for the wall texture
 void setTextureNorth(java.lang.String fileName)
          Mutator for the wall texture
 void setTextureSouth(java.lang.String fileName)
          Mutator for the wall texture
 void setTextureWest(java.lang.String fileName)
          Mutator for the wall texture
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Room

public Room(double w,
            double h,
            double d,
            java.lang.String desc)
Constructor for objects of class Room

Method Detail

addBlock

public void addBlock(Block block)
Add a block to this room.

Parameters:
block - The block object to be added to the room

getBlocks

public java.util.ArrayList<Block> getBlocks()
Get the block

Returns:
The collection of blocks

getDescription

public java.lang.String getDescription()
Get the description of the room

Returns:
The description string

setTextureNorth

public void setTextureNorth(java.lang.String fileName)
Mutator for the wall texture


setTextureEast

public void setTextureEast(java.lang.String fileName)
Mutator for the wall texture


setTextureSouth

public void setTextureSouth(java.lang.String fileName)
Mutator for the wall texture


setTextureWest

public void setTextureWest(java.lang.String fileName)
Mutator for the wall texture


setExit

public void setExit(java.lang.String direction,
                    Room room)
Create an exit to a room

Parameters:
direction - the direction of the exit
room - the room that this direction exits to

getExit

public Room getExit(java.lang.String direction)
Get the room a direction exits to.

Parameters:
direction - a string indicating a direction
Returns:
the room that the direction exits to. null if no exit in that direction

getWidth

public double getWidth()
Accessor for the room's dimension


getDepth

public double getDepth()
Accessor for room's dimension