1#ifndef PLAYER_H_DEFINED
2#define PLAYER_H_DEFINED
4#include <Interface/Window.hpp>
40 void moveTo(
int x,
int y);
42 void move(Direction direction);
45 void update(
Board* board);
48 bool headHit(
int x,
int y);
56 bool bodyHit(
int x,
int y,
bool isCheckingHead=
false);
61 std::vector<Body> body;
65 Direction currentDirection;
66 Direction nextDirection;
A level where the snake runs and eats fruits.
int getX()
Returns the head's x position.
int getY()
Returns the head's y position.
bool bodyHit(int x, int y, bool isCheckingHead=false)
Tells if something at #x and #y collides with any part of the snake.
A segment of the terminal screen (2D char matrix).