Skip to content

Commit

Permalink
Allow to pause the game and add screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
korge-game-engine committed Jun 17, 2024
1 parent df45e52 commit 4d7cd24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Binary file added screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class MyScene : PixelatedScene(256 * 2, 196 * 2, sceneSmoothing = true) {
//tileMap.map.push(4, 4, Tile(7))
//tileMap.map.push(4, 4, Tile(tile, orientation))

var snake = Snake(listOf(PointInt(5, 5)), maxLen = 2)
var snake = Snake(listOf(PointInt(5, 5)), maxLen = 8)
.withExtraMove(SnakeMove.RIGHT)
//.withExtraMove(SnakeMove.RIGHT)
snake.render(ints, snakeMap.map)
Expand Down Expand Up @@ -109,6 +109,7 @@ class MyScene : PixelatedScene(256 * 2, 196 * 2, sceneSmoothing = true) {
down(Key.RIGHT) { direction = SnakeMove.RIGHT }
down(Key.UP) { direction = SnakeMove.UP }
down(Key.DOWN) { direction = SnakeMove.DOWN }
down(Key.SPACE) { speed = if (speed != 0.0) 0.0 else 1.0 }

//down(Key.LEFT) { updateOrientation { it.rotatedLeft() } }
//down(Key.RIGHT) { updateOrientation { it.rotatedRight() } }
Expand Down

0 comments on commit 4d7cd24

Please sign in to comment.