public class Room extends Rect implements Graph.Node, Bundlable
| Modifier and Type | Class and Description |
|---|---|
static class |
Room.Door |
static class |
Room.Type |
| Modifier and Type | Field and Description |
|---|---|
java.util.HashMap<Room,Room.Door> |
connected |
int |
distance |
java.util.HashSet<Room> |
neighbours |
int |
price |
static java.util.ArrayList<Room.Type> |
SPECIALS |
Room.Type |
type |
| Constructor and Description |
|---|
Room() |
| Modifier and Type | Method and Description |
|---|---|
void |
addNeighbor(Room other) |
Point |
center() |
void |
connect(Room room) |
int |
distance() |
void |
distance(int value) |
boolean |
dontPack() |
java.util.Collection<Room> |
edges() |
Room.Door |
entrance() |
boolean |
inside(int p) |
int |
price() |
void |
price(int value) |
int |
random(Level level) |
int |
random(Level level,
int m) |
void |
restoreFromBundle(Bundle bundle) |
static void |
restoreRoomsFromBundle(Bundle bundle) |
static void |
shuffleTypes() |
void |
storeInBundle(Bundle bundle) |
static void |
storeRoomsInBundle(Bundle bundle) |
static void |
useType(Room.Type type) |
public java.util.HashSet<Room> neighbours
public int distance
public int price
public static final java.util.ArrayList<Room.Type> SPECIALS
public Room.Type type
public int random(Level level)
public int random(Level level, int m)
public void addNeighbor(Room other)
public void connect(Room room)
public Room.Door entrance()
public boolean inside(int p)
public Point center()
public int distance()
distance in interface Graph.Nodepublic void distance(int value)
distance in interface Graph.Nodepublic int price()
price in interface Graph.Nodepublic void price(int value)
price in interface Graph.Nodepublic java.util.Collection<Room> edges()
edges in interface Graph.Nodepublic void storeInBundle(Bundle bundle)
storeInBundle in interface Bundlablepublic void restoreFromBundle(Bundle bundle)
restoreFromBundle in interface Bundlablepublic static void shuffleTypes()
public static void useType(Room.Type type)
public static void restoreRoomsFromBundle(Bundle bundle)
public static void storeRoomsInBundle(Bundle bundle)