1#ifndef FRUITMANAGER_H_DEFINED
2#define FRUITMANAGER_H_DEFINED
4#include <Game/Player.hpp>
5#include <Game/Board.hpp>
6#include <Interface/Window.hpp>
48 void add(
int x,
int y);
59 std::vector<Fruit> fruit;
A level where the snake runs and eats fruits.
FruitManager(int amount)
Creates a Fruit container that has at most amount fruits at once on the screen.
void update(Player *player, Board *board)
Updates internal fruits, adding them to the board and making sure it doesn't touch player.
int getAmount()
Returns the maximum size we can store within this manager.
void add(int x, int y)
Creates a fruit, adding it at x, y.
void addRandomly(Board *board, Player *player)
Creates a fruit randomly within boundaries of board, making sure that it's not inside player.
bool eatenFruit(Player *player)
Tells if the player has eaten a fruit this frame.
A segment of the terminal screen (2D char matrix).