ELEC2645 (2018/19) / Mbed 2 deprecated el17lw

Dependencies:   mbed

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 {