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)); }
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"])); }
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"])); }
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"])); }
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"])); }
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" })); }
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" })); }
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"); }