-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHeader.h
More file actions
55 lines (46 loc) · 741 Bytes
/
Copy pathHeader.h
File metadata and controls
55 lines (46 loc) · 741 Bytes
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
#pragma once
#include<iostream>
#include<Windows.h>
#include<winuser.h>
#include<string>
#include<cstdlib>
#include<ctime>
#include<vector>
using namespace std;
class ControlKeys {
public:
int Right;
int Left;
ControlKeys();
};
class Car {
public:
int left_b;
int right_b;
int top_b;
int bottom_b;
int posX;
int posY;
int max_i;
string shape;
Car();
};
class Obstacle {
public:
int posX;
int posY;
string shape;
Obstacle();
void setPosition(int x, int y);
};
class Game {
public:
Car car;
vector<Obstacle> obs;
int bottom_limit, left_limit, top_limit, right_limit;
vector<string> game_lines; //Each row of game frame
vector<string> player; //Player rows
Game();
void DisplayGame();
void DisplayPlayer();
};