Skip to content

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
soywiz committed Jun 17, 2024
1 parent b837acf commit 51aba6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class MyScene : PixelatedScene(256 * 2, 196 * 2, sceneSmoothing = true) {

fun putRandomApple() {
while (true) {
val p: PointInt = Random[Rectangle(0, 0, ints.width, ints.height)].toInt()
val p: PointInt = Random[Rectangle(0, 0, ints.width - 0.5, ints.height - 0.5)].toIntFloor()
if (ints[p] == GROUND) {
ints[p] = APPLE
break
Expand Down

0 comments on commit 51aba6b

Please sign in to comment.