-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGame.h
executable file
·57 lines (53 loc) · 1018 Bytes
/
Game.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef GAME_H
#define GAME_H
#include <string>
#include <vector>
#include "window.h"
class GraphicView;
class Interpretter;
class Block;
class Level;
class Board;
class TextView;
class View;
class Score;
class Game {
Interpretter* theInterpreter;
Level* currLevel;
char nextBlockType;
Block* currBlock;
Board* theBoard;
Score* currScore;
std::string scriptFile;
int totalRowsCleared, trySinceLastClear;
bool loss;
std::vector<View*> displays;
bool textonly;
void updateDisplay();
int rows = 18;
int columns = 11;
int startXCoordinate = 3;
int startYCoordinate = 0;
public:
Game();
~Game();
void left(int);
void right(int);
void down(int);
void drop(int);
void clockwise(int);
void anticlockwise(int);
void levelUp(int);
void levelDown(int);
void generateNextBlock();
void start();
void restart();
void lost();
void setScriptFile(std::string);
void setLevel(int);
void setCurrBlock(char);
void setLevelRandom();
void setLevelNoRandom(std::string);
void setTextOnly();
};
#endif