Java 11 migrate remaining (g,h,i) (#1116)
* Moves game-loop to Java 11 * Moves guarded-suspension to Java 11 * Moves half-sync-half-async to Java 11 * Moves hexagonal to Java 11 * Moves intercepting-filter to Java 11 * Moves interpreter to Java 11 * Moves iterator to Java 11
This commit is contained in:
committed by
Ilkka Seppälä
parent
7d0a5c0edb
commit
f835d3d516
@ -70,7 +70,7 @@ public abstract class GameLoop {
|
||||
* @return {@code true} if the game is running.
|
||||
*/
|
||||
public boolean isGameRunning() {
|
||||
return status == GameStatus.RUNNING ? true : false;
|
||||
return status == GameStatus.RUNNING;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -80,7 +80,7 @@ public abstract class GameLoop {
|
||||
*/
|
||||
protected void processInput() {
|
||||
try {
|
||||
int lag = new Random().nextInt(200) + 50;
|
||||
var lag = new Random().nextInt(200) + 50;
|
||||
Thread.sleep(lag);
|
||||
} catch (InterruptedException e) {
|
||||
logger.error(e.getMessage());
|
||||
|
Reference in New Issue
Block a user