Go to the source code of this file.
Data specific to the player
Record of what the player has seen in a level
bool attackmove |
( |
Mob * |
player, |
|
|
unsigned int |
x, |
|
|
unsigned int |
y |
|
) |
| |
Move and attack at the same time - if a mob is in the target cell, damage it, but don't move.
- Parameters
-
player | Entity representing the player. |
x | x-coordinate to move to. |
y | y-coordinate to move to. |
- Returns
- If the player damaged a mob.
bool attackmove_relative |
( |
Mob * |
player, |
|
|
int |
xdiff, |
|
|
int |
ydiff |
|
) |
| |
Like attackmove, but relative position.
- Parameters
-
player | Entity representing the player. |
xdiff | Difference in the x-axis to move. |
ydiff | Difference in the y-axis to move. |
- Returns
- If the player damaged a mob.
Mob* create_player |
( |
void |
| ) |
|
Create and return a new player. This prompts the user for stuff, and clears the screen when it is done.
void player_death |
( |
Mob * |
player | ) |
|
Say that the player is dead, and do stuff.
- Parameters
-
void player_turn |
( |
Mob * |
player | ) |
|
Wait for user input, and then act accordingly.
- Parameters
-