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: Ship/Ship.h
- Revision:
- 8:86cb9a9f8a73
- Parent:
- 6:5bea67cc96f9
- Child:
- 20:0b6f1cfc5be6
--- a/Ship/Ship.h Tue Mar 24 16:44:48 2020 +0000
+++ b/Ship/Ship.h Thu Mar 26 15:24:49 2020 +0000
@@ -1,3 +1,5 @@
+#ifndef SHIP_H
+#define SHIP_H
#include "mbed.h"
#include "N5110.h"
@@ -7,8 +9,10 @@
{
public:
- void init(int y, int height, int width); //dimensions of the ship without shooter, y position is bottom of the screen
- void draw(N5110 &lcd); //Draws basic rectangle ship
+ Ship();
+ ~Ship();
+ void init(int height, int width); //dimensions of the ship without shooter, y position is bottom of the screen
+ void render(N5110 &lcd); //Draws basic rectangle ship
Vector2D get_position(); //Returns position of ship
void update(Direction d, float mag); //Interface between joystick and ship control
int get_height();
@@ -23,3 +27,5 @@
int Speed; //speed of ship
// bool Life;
};
+
+#endif
\ No newline at end of file