summaryrefslogtreecommitdiffstats
path: root/labb4/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'labb4/mainwindow.cpp')
-rw-r--r--labb4/mainwindow.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/labb4/mainwindow.cpp b/labb4/mainwindow.cpp
index 1d3f5e0..6fd4422 100644
--- a/labb4/mainwindow.cpp
+++ b/labb4/mainwindow.cpp
@@ -153,11 +153,10 @@ bool MainWindow::tryMove(Hero hero, const Point& point) {
* Process results of viable move
*/
void MainWindow::processMove(bool waiting) {
- // GameState copy=gameState;
- // copy.moveRobots();
- // gameState=copy;
+ GameState copy=gameState;
+ copy.moveRobots();
+ gameState=copy;
- gameState.moveRobots();
score += gameState.countCollisions() * (POINTS_PER_ROBOT +
(waiting ? WAIT_BONUS : 0));
gameState.draw(scene);