Snoke
Game_init.h
Go to the documentation of this file.
1 #ifndef GAME_INIT_H
2 #define GAME_INIT_H
3 
4 #include "shared.h"
5 #include "Game/game.h"
6 
15 TEST(Game_init, test0){
16  Game game;
17  SUCCEED();
18 }
19 
23 TEST(Game_init, test1) {
24  Game game;
25  int size = 100;
26  int speed = 150;
27  bool retVal = game.init(size, speed);
28  if(retVal)
29  {
30  SUCCEED();
31  }
32  else
33  {
34  FAIL();
35  }
36 }
37 
41 TEST(Game_init, test2) {
42  Game game;
43  int size = 5;
44  int speed = 150;
45  bool retVal = game.init(size, speed);
46  if(!retVal)
47  {
48  SUCCEED();
49  }
50  else
51  {
52  FAIL();
53  }
54 }
55 
59 TEST(Game_init, test3) {
60  Game game;
61  int size = 20;
62  int speed = 80;
63  bool retVal = game.init(size, speed);
64  if(retVal)
65  {
66  SUCCEED();
67  }
68  else
69  {
70  FAIL();
71  }
72 }
73 
77 TEST(Game_init, test4) {
78  Game game;
79  int size = 20;
80  int speed = 11500;
81  bool retVal = game.init(size, speed);
82  if(retVal)
83  {
84  SUCCEED();
85  }
86  else
87  {
88  FAIL();
89  }
90 }
91 
92 
93 #endif // GAME_INIT_H
bool init(int size=20, int sp=100, int loops=-1)
Initializes game.
Definition: game.cpp:38
Definitions and prototypes for Game class.
TEST(Game_init, test0)
Game class object can be created.
Definition: Game_init.h:15
shared functions for testing
Main game class.
Definition: game.h:30