Skip to content

Commit

Permalink
add pip boolean to game
Browse files Browse the repository at this point in the history
Signed-off-by: J10a1n15 <45315647+j10a1n15@users.noreply.github.com>
  • Loading branch information
j10a1n15 committed Sep 21, 2024
1 parent dcdee68 commit 17d8398
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/kotlin/gay/j10a1n15/sillygames/games/Game.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ abstract class Game {
open fun onKeyHeld(key: Int) {}

open fun onKeyPressed(key: Int) {}

open val pip = false
}
2 changes: 2 additions & 0 deletions src/main/kotlin/gay/j10a1n15/sillygames/games/Snake.kt
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,6 @@ class Snake : Game() {
private fun randomLocation(): Vector2d = Vector2d((0 until gridWidth).random(), (0 until gridHeight).random()).let {
if (it in snake) randomLocation() else it
}

override val pip = true
}

0 comments on commit 17d8398

Please sign in to comment.