This class is the engine of the program. It encapsulates all the methods to do with managing scores, commands and player states(dead/alive).

Revision:
12:bdaf4e1d615e
Parent:
11:48190450b7e5
Child:
13:1684970587ce
diff -r 48190450b7e5 -r bdaf4e1d615e Operator.cpp
--- a/Operator.cpp	Mon May 01 17:04:21 2017 +0000
+++ b/Operator.cpp	Tue May 02 14:02:32 2017 +0000
@@ -104,7 +104,7 @@
 
 void Operator::_displayNextPlayer(Controller &ctrl, N5110 &lcd, int thenext_player)
 {
-    printf("OPP.DisplayNextPlayer threnext_player %d\n", thenext_player);
+    printf("OPP.DisplayNextPlayer threnext_player %d\n", thenext_player); 
     char buff[14];
     sprintf(buff,"Player %d ",thenext_player+1);
     lcd.printString(buff,20,2);
@@ -132,10 +132,10 @@
 {
 
     myplayers[0].wait = 0.3;
-    myplayers[1].wait = 0.3;
     myplayers[0].status = true;
     myplayers[0]._score = 0;
-    myplayers[1]._score = 0;
+    myplayers[1]._score = 0; 
+    myplayers[1].wait = 0.3;
 
     if (num_of_players == 1) {
         myplayers[1].status = false;
@@ -168,7 +168,7 @@
     _score = 0;
 }
 
-void Operator::_assessment(N5110 &lcd, int _score)
+void Operator::_assessment(N5110 &lcd, int _score) 
 {
     //printf("OPP.ASSESSMENT score = %d\n", _score);
     lcd.printString("Game Over",16,0);