Skip to content

Commit

Permalink
minor tweaks to MovingBlock example
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornregnell committed Jun 11, 2024
1 parent b7c3b0c commit 43f1129
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/scala/introprog/examples/TestBlockGame.scala
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ object TestBlockGame:
def timestampLastMove = _timestampLastMove

var x = 0

var y = 0

def move(): Unit =
Expand Down Expand Up @@ -117,6 +118,7 @@ object TestBlockGame:
loopCounter += 1

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

end MovingBlock

0 comments on commit 43f1129

Please sign in to comment.