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:
- 5:bb6edc5b5be3
- Child:
- 6:8473dacbeb65
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Ship/Ship.h Tue Mar 05 07:08:57 2019 +0000
@@ -0,0 +1,34 @@
+#ifndef SHIP_H
+#define SHIP_H
+
+#include "mbed.h"
+#include "N5110.h"
+#include "Gamepad.h"
+
+
+class Ship
+{
+
+public:
+ Ship();
+ ~Ship();
+
+ // enter default position and size of ship that will change depending on ship
+ void init(int ship_speed,int ship_width,int ship_height,int _ship_xpos,int _ship_ypos,const int ship_shape);
+ void draw_ship(N5110 &lcd);
+ // Updates the ships position when its x and y position are entered
+ void update_ship();
+ // Gets the ships current position
+ Vector2D get_pos();
+
+private:
+ int _ship_speed;
+ int _ship_width;
+ int _ship_height;
+ int _ship_xpos;
+ int _ship_ypos;
+ const int ship_shape;
+
+};
+
+#endif
\ No newline at end of file