Skip to content

Commit

Permalink
Fix game time counting
Browse files Browse the repository at this point in the history
  • Loading branch information
italankin committed Apr 4, 2020
1 parent 21b52c4 commit bae3f9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/src/debug/java/com/italankin/fifteen/GameManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public void run() {
mSurfaceHolder.unlockCanvasAndPost(canvas);
}
}
elapsed = System.currentTimeMillis() - startTime;
delay();
elapsed = System.currentTimeMillis() - startTime;
timeBuffer += elapsed;
frameBuffer += 1.0f;
if (timeBuffer > 1000) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public void run() {
mSurfaceHolder.unlockCanvasAndPost(canvas);
}
}
elapsed = System.currentTimeMillis() - startTime;
delay();
elapsed = System.currentTimeMillis() - startTime;
}
}

Expand Down

0 comments on commit bae3f9d

Please sign in to comment.