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:
- 29:bdc4138b5171
- Parent:
- 26:4253656c0755
--- a/Coin/Coin.cpp Tue May 07 08:39:38 2019 +0000 +++ b/Coin/Coin.cpp Tue May 07 17:21:00 2019 +0000 @@ -30,8 +30,8 @@ } void Coin::generate_coin() { - // Toggle the state of the coin every 3 loop iterations so it looks like it is - // rotating. + // Toggle the state of the coin every 3 loop iterations. This will be used to + // print different coin sprites so it looks like it is rotating. if (_coin_counter == 2) { _coin_counter = 0; _rotate_coin = !_rotate_coin; @@ -40,6 +40,7 @@ } void Coin::set_coin(int rand_x, int rand_y) { + // Set the coin coords based on input values. if (rand_y > 40) { _y = 15; // Set the coin on the top platforms. } else {