Commit 471b820 1 parent 4045cd8 commit 471b820 Copy full SHA for 471b820
File tree 4 files changed +77
-0
lines changed
4 files changed +77
-0
lines changed Original file line number Diff line number Diff line change
1
+ #pragma once
2
+
3
+ class Game
4
+ {
5
+ bool isrunning;
6
+
7
+ public:
8
+ Game ();
9
+ ~Game ();
10
+ bool running ();
11
+ };
12
+
13
+ Game::Game ()
14
+ {
15
+ isrunning = true ;
16
+ }
17
+
18
+ Game::~Game ()
19
+ {
20
+
21
+ }
22
+
23
+ bool Game::running ()
24
+ {
25
+ return isrunning;
26
+ }
Original file line number Diff line number Diff line change
1
+ #pragma once
2
+
3
+ #include " ../game/game.h"
4
+
5
+ #include < SDL2/SDL.h>
6
+
7
+ class Interface
8
+ {
9
+ Game game;
10
+
11
+ public:
12
+ Interface (Game &);
13
+ ~Interface ();
14
+ void display ();
15
+ void getInput ();
16
+ };
17
+
18
+ Interface::Interface (Game &g)
19
+ {
20
+ game = g;
21
+ }
22
+
23
+ Interface::~Interface ()
24
+ {
25
+
26
+ }
27
+
28
+ void Interface::display ()
29
+ {
30
+
31
+ }
32
+
33
+ void Interface::getInput ()
34
+ {
35
+
36
+ }
Original file line number Diff line number Diff line change
1
+ #include " game\game.h"
2
+ #include " interface\interface.h"
3
+
4
+ int main ()
5
+ {
6
+ Game game;
7
+ Interface interface (game);
8
+
9
+ while (game.running ())
10
+ {
11
+ game.play ();
12
+ interface.display ();
13
+ interface.getInput ();
14
+ }
15
+ }
File renamed without changes.
You can’t perform that action at this time.
0 commit comments