| LogDoctor 4.00 Parse Apache2/Nginx/IIS logs and view dinamically generated statistics

Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Food Class Referencefinal

## Public Member Functions
unsigned | X () const noexcept
| Returns the position on the X-axis.
unsigned | Y () const noexcept
| Returns the position on the Y-axis.
bool | inTile (const unsigned x, const unsigned y) const noexcept
| Checks whether is there a part of the snake in the given position.
void | spawn (const Snake &snake, const Snake &snake_) noexcept
| Spawns the egg/rat in a new position.
void | move (const Snake &snake)
| Moves the rat.
void | update (const unsigned new_x, const unsigned new_y) noexcept
| Updates the position and direction of the entity.

## Private Attributes
const QPixmap | img_rat { ":/games/games/snake/rat.png" }
| The image which graphically represents the food.
bool | movable
| < Whether the food is a rat or an egg
unsigned | x
| The position on the Y-axis.

## Member Function Documentation

## ◆ Y()

unsigned Food::Y | ( |  | ) | const
| noexcept

Returns the position on the Y-axis.

Returns the image

## Member Data Documentation

## ◆ movable

bool Food::movable
| private

< Whether the food is a rat or an egg

The position on the X-axis

The documentation for this class was generated from the following files:

- logdoctor/games/snake/food.h
- logdoctor/games/snake/food.cpp