-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHeader.h
More file actions
51 lines (43 loc) · 930 Bytes
/
Header.h
File metadata and controls
51 lines (43 loc) · 930 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
#pragma once
#include<SFML/Graphics.hpp>
#include<iostream>
#include<time.h>
#include<stdlib.h>
#include<Windows.h>
#include<string>
using namespace sf;
using namespace std;
class Grid{
protected:
Sprite pacman;
Sprite * bricks= new Sprite[900];
RenderWindow grid;
Sprite *fruits= new Sprite [900];
Texture texture_pacman;
Texture texture_bricks;
Texture texture_fruit;
public:
Grid();
void Display();
};
class Ghost: virtual public Grid{
public:
Sprite ghost;
Texture texture_ghost;
Ghost();
Ghost(float num1, float num2);
void show();
void Scatter();
void Follow(float x, float y);
int getX();
int getY();
bool bricks_check_Ghost(float x, float y, int direaction);
};
class Engine: virtual public Grid, virtual public Ghost{
protected:
int scores, lives;
public:
Engine();
void Running();
bool bricks_check(float x, float y, int drection);
};