4#include <Misc/Array2D.hpp>
5#include <Interface/Window.hpp>
14#define BOARD_DEFAULT_PLAYER_X 2
15#define BOARD_DEFAULT_PLAYER_Y 2
35 static int small_width;
36 static int small_height;
38 static int medium_width;
39 static int medium_height;
41 static int large_width;
42 static int large_height;
60 bool isBorder(
int x,
int y);
83 void setBoard(std::vector<std::vector<bool> >& newBoard);
95 void setStartX(
int x);
96 void setStartY(
int y);
102 void setMetadata(std::string name, std::string value);
128 std::map<std::string, std::string> metadata;
A level where the snake runs and eats fruits.
void randomlyFillExceptBy(int x, int y)
Places random walls all over the Board except by #x and #y, allowing the Player to move a little bit ...
Style style
Tells if the player will teleport when reaching the Board's limits or not.
Style
If the player will teleport when reaching the Board's limits or not.
void setMetadata(std::string name, std::string value)
Sets a meta information from this level.
bool isWall(int x, int y)
Tells if there's a wall at #x #y.
std::string getMetadata(std::string name)
Gets a meta information from this level.
Board(int width, int height, Style style)
Creates a new Board.
void setBoard(std::vector< std::vector< bool > > &newBoard)
Sets the whole level content.
bool hasMetadata(std::string name)
Tells if this level has a specific information attached.
void teleport(Player *player)
Makes the Player teleport if it's on a border.
void clear()
Makes the whole level empty.
A segment of the terminal screen (2D char matrix).