public class Room
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
Exit[] |
exits
The list of exits in this room
|
int |
number
The unique number of the room
|
Constructor and Description |
---|
Room(Exit predecessor,
int numberOfExits,
boolean room,
java.lang.String desc,
Counter c)
Constructs a room with a given predecessor, number of exits, description and counter
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Room> |
generate(Counter c,
Dungeon.Type type,
java.util.HashMap<java.lang.Integer,java.lang.Integer> map)
Generates the content of the room
|
static Room |
RandomRoom(boolean first,
Exit predecessor,
Counter c,
Dungeon.Type type,
java.util.HashMap<java.lang.Integer,java.lang.Integer> map)
Generates a random room
|
java.lang.String |
toLongString()
Returns a long description
|
java.lang.String |
toShortString()
Returns a short description
|
java.lang.String |
toString() |
public int number
public Exit[] exits
public Room(Exit predecessor, int numberOfExits, boolean room, java.lang.String desc, Counter c)
predecessor
- Predecessor roomnumberOfExits
- Number of exitsroom
- Whether it is a roomdesc
- Description of roomc
- Room counterpublic java.util.List<Room> generate(Counter c, Dungeon.Type type, java.util.HashMap<java.lang.Integer,java.lang.Integer> map)
c
- Room countertype
- Environment typemap
- Experimental mappublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toLongString()
public java.lang.String toShortString()
public static Room RandomRoom(boolean first, Exit predecessor, Counter c, Dungeon.Type type, java.util.HashMap<java.lang.Integer,java.lang.Integer> map)
first
- Whether it is the first roompredecessor
- Predecessor roomc
- Room countertype
- Environment typemap
- The map for experimental mode