ChessClock::addTime() for time controllers to work
[chessclock] / classes / chessclock.cpp
index d3b169a..a0d884f 100644 (file)
@@ -93,7 +93,7 @@ TurnInformation* ChessClock::endTurn()
     currentTurn_->turnReady(timeAvailableBeforeTurn_ );
     TurnInformation* information = currentTurn_;
     currentTurn_ = 0;
-    emit endTurn();
+    emit turnEnded();
     return information;
 }
 
@@ -132,6 +132,12 @@ void ChessClock::setTimeAvailable(int msecs)
     timeAvailableBeforeTurn_ = msecs;
 }
 
+
+void ChessClock::addTime(int msecs)
+{
+   timeAvailableBeforeTurn_ += msecs;
+}
+
 void ChessClock::updateClock()
 {
     // Check loser