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: Coin/Coin.cpp
- Revision:
- 16:331be5c7ed80
- Parent:
- 15:876c047a6ec9
- Child:
- 21:20478f086bc2
--- a/Coin/Coin.cpp Sat Apr 06 17:13:37 2019 +0000 +++ b/Coin/Coin.cpp Wed Apr 10 13:40:58 2019 +0000 @@ -24,7 +24,7 @@ void Coin::init() { // Initialise starting position of the coin. - _x = 10; + _x = 20; _y = 33; _coin_counter = 0; } @@ -41,8 +41,8 @@ void Coin::update_coin(int rand_x, int rand_y) { // Move the coin to a new random location - if (rand_y > 50) { - _y = 13; + if (rand_y > 40) { + _y = 15; } else { _y = 33; } @@ -66,4 +66,4 @@ int Coin::get_coin_y() { return _y; -} \ No newline at end of file +}