Exemplo n.º 1
0
 /// <summary>
 /// Fires the <i>GameEnded</i> event.
 /// </summary>
 /// <param name="e"></param>
 private void OnGameEnded(GameEndedEventArgs e)
 {
     if (this.gameEnded != null)
     {
         this.gameEnded(this, e);
     }
 }
Exemplo n.º 2
0
        private void HandleCountryCollectionChange(object sender, CollectionChangeEventArgs e)
        {
            if (e.Action == CollectionChangeAction.Remove)
            {
                if (this.countries.Count == 1)
                {
                    GameEndedEventArgs ge =
                        new GameEndedEventArgs(this.countries[0],
                                               VictoryType.MilitaryVictory);

                    OnGameEnded(ge);
                }
            }
        }