LogDoctor/docs/html/classSnake.html

7.7 KiB

<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"> <head> </head>
LogDoctor 3.00
Parse Apache2/Nginx/IIS logs and view dinamically generated statistics
Loading...
Searching...
No Matches
Inheritance diagram for Snake:

Classes

struct  Tile
 

Public Member Functions

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.
 

Private Member Functions

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

Generated by doxygen 1.9.8 </html>