summaryrefslogtreecommitdiff
path: root/World.h
diff options
context:
space:
mode:
authormiguel <miguel@localhost>2017-09-13 10:50:03 +0200
committermiguel <miguel@localhost>2017-09-13 10:50:03 +0200
commite2063047ee1d145dbdf1963a23f183cc9db9bf52 (patch)
tree6c4d876781b072f4937d40acf22367b7c1ccb642 /World.h
parent842c21d6aab2f38e35ea668194f67f85af2e3539 (diff)
coins, bigger level, hud, etc
Diffstat (limited to 'World.h')
-rw-r--r--World.h32
1 files changed, 9 insertions, 23 deletions
diff --git a/World.h b/World.h
index fba93b1..e029604 100644
--- a/World.h
+++ b/World.h
@@ -5,10 +5,6 @@ struct Brick
{
int altitude; //meter above sea level
int type;
-// ~Brick(){std::cout<<"deconstruct"<< std::endl;}
-// Brick(int altitude, int type){std::cout<<"construct"<< std::endl;}
-
-
};
struct Player
@@ -16,34 +12,24 @@ struct Player
int x;
int y;
double x2;
+ double y2;
int speed;
int anim;
+ bool dead;
+ bool win;
};
struct World
{
Player player;
- std::vector<std::vector<Brick>> bricks=
- {
- { {0,2} },
- { {0,2} },
- { {0,2} },
- { {0,0},{5,1} },
- { {0,0},{5,1} },
- { {0,0},{5,1} },
- { {0,0},{5,1} },
- {},
- { {5,1} },
- { {5,1} },
- { {0,0},{5,1} },
- { {0,0},{5,1} },
- { {0,0},{5,1} },
- { {1,0},{5,1} },
- { {2,0},{5,1},{7,1} },
- { {3,0},{6,1} }
- };
+ std::vector<int> coins_pos;
+ std::vector<std::vector<Brick>> bricks{{{}}};
+ int level;
+ int coins;
World(int level);
void sim(double);
void mouseclick(int x, int y);
+ void reset();
+ void next_level();
};