#include <Hunter.h>
Public Member Functions | |
| Hunter (const string &name="A player", char decal= 'x') | |
| virtual void | makeMove ()=0 |
| int | distanceToMonster () |
| Coord | positionOfMonster () |
| void | setMonster (Monster *monster) |
A Hunter. Inherit from this class to implement your player class
| int Hunter::distanceToMonster | ( | ) |
get the distance to the monster in moves. Cost: 1 point.
| virtual void Hunter::makeMove | ( | ) | [pure virtual] |
Overwrite this function to implement your player's behavior. You can use the public member functions in Mobile and Hunter or in other classes. Remember that you only have 1-5 points per round and move, teleport, getPosition, distanceToMonster and positionOfMonster (some of them are inherited from Mobile) cost points.
Implements Mobile.
Implemented in HunterChecker, and HunterRandom.
| Coord Hunter::positionOfMonster | ( | ) |
get the position of the monster. Cost: 2 points.
| void Hunter::setMonster | ( | Monster * | monster | ) | [inline] |
this is only used by the game to initialize your "monster scanner" which allows you to use distanceToMonster() and positionOfMonster().
1.7.4