-
Notifications
You must be signed in to change notification settings - Fork 0
/
GameWorld.h
50 lines (40 loc) · 882 Bytes
/
GameWorld.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
//GameWorld.h
//Jordan Baxter
#pragma once
#include "ofMain.h"
class Brick;
class Ball;
class Paddle;
enum Game_State {
PLAY,
WIN,
LOSE
};
class GameWorld {
public:
GameWorld();
void fetchLevelLayout(string file1, string file2, string file3);
void nextLevel();
void changeState(enum Game_State gs);
void draw();
void resize(Brick* brick, Paddle* paddle, Ball* ball);
void loseLife();
enum Game_State getState();
char getLayout(int i, int j);
bool noBricks(vector<Brick*> &bricks);
bool noLives();
void generateBricks(vector<Brick*> &bricks);
void generateBalls(vector<Ball*> &balls);
void scoreUp(int x);
int getLevel();
void reset(vector <Brick*> &bricks, Ball* ball);
private:
ofTrueTypeFont gamefont;
char levelLayout1[4][12];
char levelLayout2[4][12];
char levelLayout3[4][12];
enum Game_State gameState;
int score;
int level;
int lives;
};