Skip to content

Instantly share code, notes, and snippets.

@mukeshsolanki
Created May 27, 2022 05:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mukeshsolanki/ca0908a7f7b9dfd66b0595f30b44fa66 to your computer and use it in GitHub Desktop.
Save mukeshsolanki/ca0908a7f7b9dfd66b0595f30b44fa66 to your computer and use it in GitHub Desktop.
fun reset() {
mutableState.update {
it.copy(
food = Pair(5, 5),
snake = listOf(Pair(7, 7)),
currentDirection = SnakeDirection.Right
)
}
currentDirection.value = SnakeDirection.Right
move = Pair(1, 0)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment