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.
Diff: Gold/Gold.h
- Revision:
- 1:9c7bb3db32bc
- Child:
- 8:c5969685cf02
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Gold/Gold.h Wed Apr 22 15:52:04 2020 +0000 @@ -0,0 +1,40 @@ +#ifndef GOLD_H +#define GOLD_H + +#include "mbed.h" +#include "N5110.h" +#include "Gamepad.h" +#include "Winch.h" +#include "Monster.h" + +/** Gold Class +@author Dr Craig A. Evans, University of Leeds +@brief Controls the claw in the Pong game +@date Febraury 2017 +*/ +class Gold +{ + +public: + Gold(); + ~Gold(); + void init(int gold_num); + void draw(N5110 &lcd); + void update(); + void gold_caught(int caught_i); + void gold_reached(int reached_i); + int get_reached_num(); + /// accessors and mutators + Vector2D get_pos(int gold_i); + void set_pos(Vector2D p); + +private: + int _gold_num; + int _gold_left; + int _gold_caught[12]; + int _gold_reached[12]; + int _x[12]; + int _y[12]; + +}; +#endif \ No newline at end of file