refactoring #1012: Format specifiers should be used instead of string concatenation. (#2715)

* refactoring #1012: Format specifiers should be used instead of string concatenation.

* refactoring #1012: Format specifiers should be used instead of string concatenation.

* refactoring #1012: Remove isInfoEnabled check
This commit is contained in:
kongleong86
2023-12-02 12:25:00 +00:00
committed by GitHub
parent a82966f202
commit 301317533e
9 changed files with 19 additions and 19 deletions
@@ -39,12 +39,10 @@ public abstract class GameLoop {
protected final GameController controller;
private Thread gameThread;
/**
* Initialize game status to be stopped.
*/
public GameLoop() {
protected GameLoop() {
controller = new GameController();
status = GameStatus.STOPPED;
}
@@ -54,7 +52,7 @@ public abstract class GameLoop {
*/
public void run() {
status = GameStatus.RUNNING;
gameThread = new Thread(this::processGameLoop);
Thread gameThread = new Thread(this::processGameLoop);
gameThread.start();
}
@@ -85,6 +83,8 @@ public abstract class GameLoop {
Thread.sleep(lag);
} catch (InterruptedException e) {
logger.error(e.getMessage());
/* Clean up whatever needs to be handled before interrupting */
Thread.currentThread().interrupt();
}
}
@@ -94,7 +94,7 @@ public abstract class GameLoop {
*/
protected void render() {
var position = controller.getBulletPosition();
logger.info("Current bullet position: " + position);
logger.info("Current bullet position: {}", position);
}
/**