public class PC extends Creature
Modifier and Type | Field and Description |
---|---|
private int |
respect |
Constructor and Description |
---|
PC(java.lang.String n,
java.lang.String d) |
Modifier and Type | Method and Description |
---|---|
void |
checkRoom() |
void |
clean() |
void |
decreaseRespect()
Decrease the players respect
|
int |
determineOutcome()
Check and see if the game is over or not
|
void |
dirty() |
void |
endGame(int outcome)
Shuts the game down
|
void |
expressDiscontent() |
void |
expressGladness() |
int |
getRespect()
Gets the respect value for the PC
|
void |
increaseRespect()
Increase the players respect
|
boolean |
moveRoom(Room r)
moves creature from one room to another
|
void |
notifyCreature() |
boolean |
play(java.util.Scanner s)
The main play method, which implements the commands present
|
void |
setResepect(int r)
Sets the respect value for the PC
|
void |
tryToMove(int direction)
Try to attempt to move to another room
|
allRoomsFull, compareTo, compareTo, drillThroughRoof, getRoom, getState, moveDirection, name, setDescription, setName, setRoom, setRoomState, setState, toString
public boolean play(java.util.Scanner s)
s
- Scanner to the inputpublic boolean moveRoom(Room r)
public void tryToMove(int direction)
direction
- numerical directionpublic int getRespect()
public void increaseRespect()
public void decreaseRespect()
public int determineOutcome()
public void endGame(int outcome)
outcome
- The outcome of the game (1 -> win, 0 -> lose)public void setResepect(int r)
r
- A respect valuepublic void notifyCreature()
notifyCreature
in class Creature
public void expressGladness()
expressGladness
in class Creature
public void expressDiscontent()
expressDiscontent
in class Creature
Harry Scells 2015 CSC241