LogDoctor/docs/html/classFood.html

10 KiB

<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"> <head> </head>
LogDoctor 2.00
Parse Apache2/Nginx/IIS logs and create statistics
Loading...
Searching...
No Matches

Public Member Functions

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

Private Attributes

QPixmap img_rat = QPixmap(":/games/games/snake/rat.png")
 Whether the food is a rat or an egg.
 
bool movable
 The position on the X-axis.
 
unsigned int x
 The position on the Y-axis.
 
unsigned int y
 The image which graphically represents the food.
 

Member Function Documentation

◆ Y()

const unsigned int & Food::Y ( ) const

Returns the position on the Y-axis.

Returns the image


The documentation for this class was generated from the following files:
  • logdoctor/games/snake/food.h
  • logdoctor/games/snake/food.cpp

Generated by doxygen 1.9.5 </html>