|
bool | inTile (const unsigned x, const unsigned y, const bool avoid_tail=true) const |
| Checks whether is there a part of the snake in the given position.
|
|
void | setDirection (const Direction new_direction) |
| Sets the new direction (of the head)
|
|
const Direction & | direction () const |
| Returns the current direction (of the head)
|
|
void | update (QGraphicsScene *field_scene=nullptr, const bool dry=false, const bool is_borning=false) |
| Updates the position and direction of the entire snake.
|
|
|
void | grow (const bool is_borning) |
| Increases the length of the body of the snake of 1 part.
|
|
The documentation for this class was generated from the following files:
- logdoctor/games/snake/snake.h
- logdoctor/games/snake/snake.cpp