package zombie
// You implement this. Your entry should be in package `player`
interface Player {
Action doTurn(PlayerContext context)
}
// These already exist
class PlayerContext {
// A square array, showing the area around you, with you at the centre
// playFields is indexed by x from West to East, then y from North to South
PlayerId[][] getPlayField()
int getBullets() // Current bullets available
int getGameClock() // Current turn number
PlayerId getId() // Id of the current player instance
int getX() // Your current x co-ordinate
int getY() // Your current y co-ordinate
Set<PlayerId> shootablePlayers() // A helper function that identifies players in range.
}
class PlayerId {
String getName() // The name of the entrant that owns this player
int getNumber() // A unique number, assigned to this player
}
// Don't implement this. Use either `Move` or `Shoot`
interface Action {}
enum Move implements Action {
NORTHWEST, NORTH, NORTHEAST,
EAST, STAY, WEST,
SOUTHEAST, SOUTH, SOUTHWEST;
static move randomMove();
}
class Shoot implements Action {
Shoot(PlayerId playertarget);
}