summary refs log tree commit diff stats
path: root/src/gamestate.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2009-06-19 11:35:01 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2009-06-19 11:35:01 -0400
commit1af772beadf5d03822c2cbdf80987e0580813602 (patch)
tree87429dc20246f1e76108cec688971a5c2af95181 /src/gamestate.h
parent684a27ce13a9a08f4f1d94621cdab1232d2d33cf (diff)
downloadmazeoflife-1af772beadf5d03822c2cbdf80987e0580813602.tar.gz
mazeoflife-1af772beadf5d03822c2cbdf80987e0580813602.tar.bz2
mazeoflife-1af772beadf5d03822c2cbdf80987e0580813602.zip
Backed out changeset 9cb52f41967c
'Twas a bad idea
Diffstat (limited to 'src/gamestate.h')
-rw-r--r--src/gamestate.h59
1 files changed, 0 insertions, 59 deletions
diff --git a/src/gamestate.h b/src/gamestate.h deleted file mode 100644 index 7d9d798..0000000 --- a/src/gamestate.h +++ /dev/null
@@ -1,59 +0,0 @@
1#ifndef GAMESTATE_H
2#define GAMESTATE_H
3
4class GameState : public State {
5 public:
6 GameState();
7 void input(SDLKey key);
8 void tick();
9 void render(SDL_Surface* screen);
10
11 class Level
12 {
13 private:
14 int level;
15 Uint32 alive[5];
16 Uint32 dead[5];
17
18 public:
19 Level();
20 int getLevel();
21 int getLevelGroup();
22 bool checkSquare(int x, int y);
23 Uint32 getAliveColor();
24 Uint32 getDeadColor();
25 void incrementLevel();
26 };
27
28 struct Info {
29 int playerx, playery;
30 Level level;
31 bool doneMaking;
32 };
33
34 class Board
35 {
36 private:
37 bool blocks[WIDTH][HEIGHT];
38 void incrementIfNeighbor(int x, int y, bool temp[WIDTH][HEIGHT], int* tick);
39 GameState::Info* info;
40 int gens;
41
42 public:
43 Board();
44 Board(GameState::Info* info);
45 bool isObstructed(int x, int y);
46 void render(SDL_Surface* screen);
47 void tick();
48 };
49
50 private:
51 Uint32 player_color;
52 Uint32 event_color;
53 bool newGame;
54 Info info;
55 Board board;
56 void move(int x, int y);
57};
58
59#endif