1 #ifndef LABYRINTH_DISPLAYHANDLER_H 2 #define LABYRINTH_DISPLAYHANDLER_H 18 TEST(Labyrinth_displayHandler, test1)
38 retVal = snake.
init(begin, direction, length);
55 TEST(Labyrinth_displayHandler, test2)
75 retVal = snake.
init(begin, direction, length);
95 TEST(Labyrinth_displayHandler, test3)
115 retVal = snake.
init(begin, direction, length);
121 retVal = labyrinth.
addSnake(&snake);
129 retVal = snake.
move(&labyrinth);
140 TEST(Labyrinth_displayHandler, test4)
160 retVal = snake.
init(begin, direction, length);
166 retVal = labyrinth.
addSnake(&snake);
177 TEST(Labyrinth_displayHandler, test5)
197 retVal = snake.
init(begin, direction, length);
203 retVal = labyrinth.
addSnake(&snake);
214 #endif // LABYRINTH_DISPLAYHANDLER_H TEST(Labyrinth_displayHandler, test1)
method runs with noraml parameters
class for containing and displaying the game field
Definitions and prototypes for Labyrinth class.
bool move(Labyrinth *labyrinth)
The snake movement on the game field(should be called in each iteration of the game cycle...
bool setLabyrinth(Point dimensions)
Sets the default values fro the variables as well as generating the labyritnh array with borders...
const int DISPPART
the whole labyrinth doesn't fit, so we are displaying it partialy
bool init(Point begin, short direction, int length)
Initializes snake as an entity without ancoring it anywhere.
const int DISPFULL
the whole labyrinth can fit and was redrawed
shared functions for testing
Describes the Snake entity of the game.
bool addSnake(Snake *snake)
Adding snake to the laburinth and getting the host snake(firest added snake)
const int MVRIGHT
snake's head is moving right
const int DISPUPD
the whole labyrinth can fit and was already fully redrawn so we just need to redraw the changed Point...
void displayHandler(int displayMethod=-1)
A method which decides what dispaly method will be used in each situation.
Coordinates and style of the cell in console window.