Snoke
Labyrinth_generateBal.h
Go to the documentation of this file.
1 #ifndef LABYRINTH_GENERATEBALL_H
2 #define LABYRINTH_GENERATEBALL_H
3 
9 #include "shared.h"
10 #include "Labyrinth/labyrinth.h"
11 
15 TEST(Labyrinth_generateBall, test1) {
16  gameFieldSize.x = 40;
17  gameFieldSize.y = 20;
18  Labyrinth labyrinth;
19  bool retVal = labyrinth.setLabyrinth(gameFieldSize);
20  if(!retVal)
21  {
22  FAIL();
23  }
24 
25  retVal = labyrinth.initBall();
26  if(!retVal)
27  {
28  FAIL();
29  }
30 
31  retVal = labyrinth.generateBall();
32  if(retVal)
33  {
34  SUCCEED();
35  }
36  else
37  {
38  FAIL();
39  }
40 
41 }
42 
43 #endif // LABYRINTH_GENERATEBALL_H
short x
Definition: common.h:55
class for containing and displaying the game field
Definition: labyrinth.h:66
Definitions and prototypes for Labyrinth class.
bool initBall()
Ball initialization with labyrinth updating.
Definition: labyrinth.cpp:71
bool generateBall()
Generate the Ball.
Definition: labyrinth.cpp:83
bool setLabyrinth(Point dimensions)
Sets the default values fro the variables as well as generating the labyritnh array with borders...
Definition: labyrinth.cpp:17
TEST(Labyrinth_generateBall, test1)
method runs with normal parameters
shared functions for testing
Point gameFieldSize
Definition: game.cpp:17
short y
Definition: common.h:56