ELEC2645 (2018/19) / Mbed 2 deprecated el17lw

Dependencies:   mbed

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
+}