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: shot/shot.h
- Revision:
- 8:8287d2ef965d
- Parent:
- 7:c49f3d3b672f
- Child:
- 9:62d6559f0d50
--- a/shot/shot.h Wed Apr 29 05:10:57 2020 +0000 +++ b/shot/shot.h Wed Apr 29 15:20:34 2020 +0000 @@ -14,9 +14,6 @@ @13 April 2020 */ - - - struct shot_posandtype { int x; int y; @@ -32,25 +29,29 @@ shot(); //destructor ~shot(); - + //generate first 10 shots void init(); - + //random pos void init_pos(shot_posandtype* i); - + //increase number of shots along with time void gen_shot(); - + //moving function void update(); void draw(N5110 &lcd); - + //if beyoud border, delete it and generate new one, keep total number constant void delete_shot(); + //accessors + void set_size(int size); + ////mutators + int get_size(); - int _size;//use for resize number of vector + //int _size;//use for resize number of vector private: - std::vector<shot_posandtype> _p; + int _size; }; #endif