Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: Engine/Engine.h
- Revision:
- 22:0d2ac98a8b48
- Parent:
- 21:6b16ca9834e6
- Child:
- 23:9be87557b89a
--- a/Engine/Engine.h Wed May 01 16:40:35 2019 +0000
+++ b/Engine/Engine.h Mon May 06 11:21:39 2019 +0000
@@ -1,6 +1,7 @@
#ifndef ENGINE_H
#define ENGINE_H
+#include <iostream>
#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
@@ -16,7 +17,7 @@
void read_input(Gamepad &pad);
void update(Gamepad &pad);
void draw(N5110 &lcd);
- void check_floors_collision();
+ void check_floors_collision(float doodler_pos_x, float doodler_pos_y);
void add_score();
void print_score(N5110 &lcd);
@@ -27,30 +28,13 @@
int _score;
- Floors _f;
- Floors _f1;
- Floors _f2;
- Floors _f3;
- Floors _f4;
- Floors _f5;
- Floors _f6;
- Floors _f7;
- Floors _f8;
-
+ Floors _f[9]; // array of 9 floors
int _floors_height;
int _floors_width;
// x and y positions of the floors
- Vector2D _f_pos;
- Vector2D _f1_pos;
- Vector2D _f2_pos;
- Vector2D _f3_pos;
- Vector2D _f4_pos;
- Vector2D _f5_pos;
- Vector2D _f6_pos;
- Vector2D _f7_pos;
- Vector2D _f8_pos;
+ Vector2D _f_pos[9]; //
Doodler _dood;
int _doodler_radius;