summaryrefslogtreecommitdiff
path: root/World.h
diff options
context:
space:
mode:
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();
};