Skip to content

Instantly share code, notes, and snippets.

@Vzhukov74
Created June 7, 2022 10:59
Show Gist options
  • Save Vzhukov74/75b57eeae89788fc281ea4359571bfcc to your computer and use it in GitHub Desktop.
Save Vzhukov74/75b57eeae89788fc281ea4359571bfcc to your computer and use it in GitHub Desktop.
switch viewModel.gameState {
case .win:
WinMsgView(onNewGame: {
viewModel.onNextRiddle()
})
.halfTransparentBg()
case .lose:
LoseMsgView(word: viewModel.riddle.answer, onNewGame: {
viewModel.onNextRiddle()
})
.halfTransparentBg()
case .waitingForNewRidle:
EmptyView()
default: EmptyView()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment