QuickClick, a reaction timing game which allows single and multiplayer mode.

Dependencies:   Controller Display N5110 Operator mbed

Revision:
13:a8c86ae9ca1b
Parent:
12:c0f1f6d007dc
Child:
14:2d4e4c3ba44e
--- a/main.cpp	Mon May 01 17:04:43 2017 +0000
+++ b/main.cpp	Tue May 02 14:02:44 2017 +0000
@@ -21,16 +21,16 @@
 int main()
 {
 
-    lcd.init();         //their default states the lcd and controller are configured
+    lcd.init();         //the lcd and controller are configured and set to their default states
     display.init();     //
     ctrl.init();       //
 
-    starter();           //Methord describing starting screen when the controller is first booted up
+    starter();           //Method describing starting screen when the controller is first booted up
 
     while(1) {
         next_player = Opp.check_next_player(next_player, lcd, ctrl, display);   // find the next player after 10 goes or failure
         if (Opp.test_player(next_player, ctrl, display, lcd)) {                 //next player returns true or flase depending on success
-            Opp.correct(next_player, ctrl);                                     // process correct response
+            Opp.correct(next_player, ctrl);                                     //process correct response
         } else {
             Opp.inCorrect(next_player, ctrl);                                   // process incorrect response
             
@@ -59,7 +59,7 @@
 
 
         float flicked = ctrl.get_joy();                                 // pressing Joystick completes selection
-        if (flicked > 1) {                                              // flicking lest or right selects no of players
+        if (flicked > 1) {                                              // flicking Joystick left or right selects no of players
             num_players--;
         }
         if (flicked < -0.5) {
@@ -68,7 +68,7 @@
         if (num_players < 1) {                                               // lowest value is 1
             num_players = 1;
         }
-        if (num_players > 2) {                                               //highest value is 2
+        if (num_players > 2) {                                               // highest value is 2
             num_players = 2;
         }
 
@@ -96,7 +96,7 @@
 
 
 
-    while (ctrl.check_event(Controller::START_PRESSED) == false) {       //whilst the start button hasn't been pressed just flash the leds and nothing else
+    while (ctrl.check_event(Controller::START_PRESSED) == false) {       //keep flashing the leds and perform no other action until start is pressed
         ctrl.ledsON();
         wait(0.1);
         ctrl.ledsOFF();