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:
- 2:c2316b659b97
- Child:
- 3:8a140aa1ddcd
diff -r 9b659b3c092b -r c2316b659b97 Ship/Ship.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Ship/Ship.h Sat Mar 14 20:52:07 2020 +0000
@@ -0,0 +1,23 @@
+
+#include Pad.h
+#include mbed.h
+#include N5110.h
+#include Gamepad.h
+
+class Ship
+{
+
+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
+ void get_position(); //Returns position of ship
+ void update(Direction d,float mag); //Interface between joystick and ship control
+
+private:
+ int Height;
+ int Width;
+ int X;
+ int Y; //y value of ship
+ int Speed; //speed of ship
+};
+#endif
\ No newline at end of file