public void PlayGame(DiceGameModel.DiceGame a_game) { a_game.AddSubscriber(this); m_view.DisplayInstructions(); while (m_view.WantsToPlay()) { m_view.DisplayInstructions(); m_view.DisplayResult(a_game.Play()); } }
private void DoWork(object sender, System.ComponentModel.DoWorkEventArgs e) { m_diceCounter = 0; if (m_game.Play()) { this.Dispatcher.BeginInvoke((Action) delegate() { GameStatus.Text = "You Won!!"; }); } else { this.Dispatcher.BeginInvoke((Action) delegate() { GameStatus.Text = "You Lost!!"; }); } }