Esempio n. 1
0
 public void OwnedByName()
 {
     Game game = new GameTest().MakeExampleGame();
     var continent = game.Continents["Testartica"];
     Assert.IsTrue(continent.OwnedByName(game, PlayerNumber.P1));
     Assert.IsFalse(continent.OwnedByName(game, PlayerNumber.P2));
 }
Esempio n. 2
0
 public void ContinentsOwned()
 {
     Game game = new GameTest().MakeExampleGame();
     var owned = game.Players[PlayerNumber.P1].ContinentsOwned;
     Assert.IsTrue(owned.Contains(game.Continents["Testartica"]));
     Assert.IsFalse(owned.Contains(game.Continents["Testarica"]));
 }
Esempio n. 3
0
 public void CountriesOwned()
 {
     Game game = new GameTest().MakeExampleGame();
     var owned = game.Players[PlayerNumber.P1].CountriesOwned;
     Assert.IsTrue(owned.Contains(game.Countries["Testistan"]));
     Assert.IsTrue(owned.Contains(game.Countries["Testlyvania"]));
     Assert.IsFalse(owned.Contains(game.Countries["Testanbul"]));
 }
Esempio n. 4
0
 public void AdjacentCountries()
 {
     Game game = new GameTest().MakeExampleGame();
     var owned = game.Countries["Testistan"].AdjacentCountries();
     Assert.IsTrue(owned.Contains(game.Countries["Testlyvania"]));
     Assert.IsTrue(owned.Contains(game.Countries["Testanbul"]));
     Assert.IsFalse(owned.Contains(game.Countries["Test States of America"]));
 }
Esempio n. 5
0
 public void Countries()
 {
     Game game = new GameTest().MakeExampleGame();
     var owned = game.Continents["Testartica"].Countries(game);
     Assert.IsTrue(owned.Contains(game.Countries["Testistan"]));
     Assert.IsTrue(owned.Contains(game.Countries["Testlyvania"]));
     Assert.IsFalse(owned.Contains(game.Countries["Testanbul"]));
 }
Esempio n. 6
0
 public void Attacks()
 {
     Game game = new GameTest().MakeExampleGame();
     var actions = game.Countries["Testistan"].Attacks();
     Assert.IsTrue(actions.Contains(new Attack()
     {
         PlayerNumber = PlayerNumber.P1,
         FromName = "Testistan",
         ToName = "Testanbul"
     }));
     Assert.IsFalse(actions.Contains(new Attack()
     {
         PlayerNumber = PlayerNumber.P1,
         FromName = "Testistan",
         ToName = "Testlyvania"
     }));
 }
Esempio n. 7
0
        public void Moves_Out()
        {
            Game game = new GameTest().MakeExampleGame();

            game.Players[PlayerNumber.P1].UnitsToMove = 0;
            var actions = game.Countries["Testistan"].Moves();
            Assert.IsFalse(actions.Contains(new Move()
            {
                PlayerNumber = PlayerNumber.P1,
                FromName = "Testistan",
                ToName = "Testanbul"
            }));
            Assert.IsFalse(actions.Contains(new Move()
            {
                PlayerNumber = PlayerNumber.P1,
                FromName = "Testistan",
                ToName = "Testlyvania"
            }));
        }
Esempio n. 8
0
 public void OwnedBy()
 {
     Game game = new GameTest().MakeExampleGame();
     Assert.AreEqual(
         game.Countries["Testistan"].OwnedBy,
         PlayerNumber.P1
         , "Ownership test 1 failed");
     Assert.AreEqual(
         game.Countries["Testanbul"].OwnedBy,
         PlayerNumber.P2
         , "Ownership test 2 failed");
 }