public KeyboardController(InGameViewModel viewModel, IGuessLetter guessLetter) { viewModel .OnKeyPressedPressed .Subscribe(letter => { Debug.Assert(letter.Length == 1, $"Something is wrong configured on KeyboardView, received {letter} and expected a letter of length 1"); guessLetter.Guess(letter[0]); }); }
public RestartGameController(InGameViewModel inGameViewModel, IRestartGame restartGame) { inGameViewModel.OnRestartGamePressed.Subscribe(_ => restartGame.Restart()); }