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: Coin/Coin.cpp
- Revision:
- 13:cb5ed2f0cbd5
- Parent:
- 12:eb8d30593e95
- Child:
- 14:58887d7e1072
diff -r eb8d30593e95 -r cb5ed2f0cbd5 Coin/Coin.cpp --- a/Coin/Coin.cpp Wed May 27 04:22:47 2020 +0000 +++ b/Coin/Coin.cpp Wed May 27 04:36:22 2020 +0000 @@ -51,4 +51,16 @@ if(side ==0 && _y >= HEIGHT/3) { pad.led(6, 0.5); } -} \ No newline at end of file +} + +void Coin::set_pos(int X, int Y){ + _x = X; + _y = Y; + } + +//accessor +Vector2D Coin::get_pos() +{ + Vector2D pos = {_x, _y}; + return pos; +}