Skip to content

Instantly share code, notes, and snippets.

@mukeshsolanki
Created May 27, 2022 05:48
Show Gist options
  • Save mukeshsolanki/f060d420c6a67c2bb74f4b120da48a2c to your computer and use it in GitHub Desktop.
Save mukeshsolanki/f060d420c6a67c2bb74f4b120da48a2c to your computer and use it in GitHub Desktop.
Class GameEngine{
private val mutableState =
MutableStateFlow(
State(
food = Pair(5, 5),
snake = listOf(Pair(7, 7)),
currentDirection = SnakeDirection.Right
)
)
val state: Flow<State> = mutableState
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment