Skip to content

Commit 43f1129

Browse files
committed
minor tweaks to MovingBlock example
1 parent b7c3b0c commit 43f1129

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/scala/introprog/examples/TestBlockGame.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ object TestBlockGame:
8888
def timestampLastMove = _timestampLastMove
8989

9090
var x = 0
91+
9192
var y = 0
9293

9394
def move(): Unit =
@@ -117,6 +118,7 @@ object TestBlockGame:
117118
loopCounter += 1
118119

119120
final def start(): Unit =
120-
pixelWindow.show() // möjliggör omstart även om fönstret stängts...
121+
pixelWindow.show() // show window again if closed and start() is called again
121122
gameLoop(stopWhen = x == dim._1 - 1 && y == dim._2 - 1)
123+
122124
end MovingBlock

0 commit comments

Comments
 (0)