Ejemplo n.º 1
0
 /// <summary>
 /// Retrieves a list of the countries that are a part of this continent.
 /// </summary>
 /// <param name="game">The game that this continent is a part of.</param>
 /// <returns>A list of the countries that are a part of this continent.</returns>
 public List<Country> Countries(Game game)
 {
     List<Country> countries = new List<Country>();
     foreach (string name in CountryNames)
     {
         countries.Add(game.Countries[name]);
     }
     return countries;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Returns whether or not the given player owns this continent.
 /// </summary>
 /// <param name="game">The game that this continent is a part of.</param>
 /// <param name="playerName">The name of the player who may own this country.</param>
 /// <returns>Whether or not the given player owns this continent.</returns>
 public bool OwnedByName(Game game, PlayerNumber playerName)
 {
     foreach(Country country in Countries(game))
     {
         if(country.OwnedBy != playerName)
         {
             return false;
         }
     }
     return true;
 }
Ejemplo n.º 3
0
 public static Game DisposeAndAcreateNewGame()
 {
     Instance = new Game();
     return Instance;
 }