public class TreasureRoom
extends java.lang.Object
Constructor and Description |
---|
TreasureRoom(int size)
Simple constructor for a random treasure room.
|
TreasureRoom(int size,
long seed)
Constructor using a fixed seed (for comparible results).
|
Modifier and Type | Method and Description |
---|---|
Content |
checkContentOf(int line,
int column)
Accessor to the content of the room.
|
int |
getBestPossibleScore() |
int |
getSize() |
Content |
pickUpContent(int line,
int column)
Picks up the content of the place given in parameter.
|
java.lang.String |
toString() |
public TreasureRoom(int size)
size
- size of the (square) room, that is number of lines and of columns.public TreasureRoom(int size, long seed)
size
- size of the (square) roomseed
- seed for the generatorpublic int getSize()
public Content checkContentOf(int line, int column)
line
- (between 0 and size -1)column
- (between 0 and size -1)public Content pickUpContent(int line, int column)
line
- (between 0 and size -1)column
- (between 0 and size -1)public int getBestPossibleScore()
public java.lang.String toString()
toString
in class java.lang.Object