public class Cowboy extends GameObject
Modifier and Type | Field and Description |
---|---|
boolean |
canMove
If the Cowboy can be moved this turn via its owner.
|
java.lang.String |
drunkDirection
The direction this Cowboy is moving while drunk.
|
int |
focus
How much focus this Cowboy has.
|
int |
health
How much health this Cowboy currently has.
|
boolean |
isDead
If this Cowboy is dead and has been removed from the game.
|
boolean |
isDrunk
If this Cowboy is drunk, and will automatically walk.
|
java.lang.String |
job
The job that this Cowboy does, and dictates how they fight and interact within the Saloon.
|
Player |
owner
The Player that owns and can control this Cowboy.
|
Tile |
tile
The Tile that this Cowboy is located on.
|
int |
tolerance
How many times this unit has been drunk before taking their siesta and resetting this to 0.
|
int |
turnsBusy
How many turns this unit has remaining before it is no longer busy and can `act()` or `play()` again.
|
logs
Modifier and Type | Method and Description |
---|---|
boolean |
act(Tile tile)
Defaults the value for the optional arg 'drunkDirection' to '""'
|
boolean |
act(Tile tile,
java.lang.String drunkDirection)
Does their job's action on a Tile.
|
boolean |
move(Tile tile)
Moves this Cowboy from its current Tile to an adjacent Tile.
|
boolean |
play(Furnishing piano)
Sits down and plays a piano.
|
log
public boolean canMove
public java.lang.String drunkDirection
public int focus
public int health
public boolean isDead
public boolean isDrunk
public java.lang.String job
public Player owner
public Tile tile
public int tolerance
public int turnsBusy
public boolean act(Tile tile)
act(Tile, String)
public boolean act(Tile tile, java.lang.String drunkDirection)
tile
- The Tile you want this Cowboy to act on.drunkDirection
- The direction the bottle will cause drunk cowboys to be in, can be 'North', 'East', 'South', or 'West'.public boolean move(Tile tile)
tile
- The Tile you want to move this Cowboy to.public boolean play(Furnishing piano)
piano
- The Furnishing that is a piano you want to play.© 2020 MST ACM SIG-GAME