Skip to content

Commit a3d364d

Browse files
Michael BalasMichael Balas
authored andcommitted
Revise Documentation
This small commit improves one comment and removes another. A more accurate description of the render method is provided: "This method displays the current state of the game". Moreover, one redundant comment is removed, "Keep looping until game ends", since it is evident that this is what the code does: "while(Game.isRunning())".
1 parent 9dcf5fd commit a3d364d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/com/redomar/game/Game.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ public void run() {
394394

395395
init(); // Initialize the game environment
396396

397-
while (Game.isRunning()) { // Keep looping until game ends
397+
while (Game.isRunning()) {
398398
long now = System.nanoTime(); // Current time (now) compared to lastTime to calculate elapsed time
399399
delta += (now - lastTime) / nsPerTick; // Elapsed time in seconds multiplied by 60
400400
lastTime = now;
@@ -442,7 +442,7 @@ public void tick() {
442442
}
443443

444444
/*
445-
* This method displays the logic of the game.
445+
* This method displays the current state of the game.
446446
*/
447447
public void render() {
448448
BufferStrategy bs = getBufferStrategy();

0 commit comments

Comments
 (0)