private static bool FindTaxCell(MonopolyCell cell) { if (cell as PayTaxCell != null) { return(true); } return(false); }
private static bool FindActionCell(MonopolyCell cell) { if (cell as ActionCell != null) { return(true); } return(false); }
public void CommunityCard4Action() { InitializeTest(); MonopolyCell current = Game.PlayerPosition[FirstPlayer]; Assert.AreEqual(0, current.ID); PrivateObject obj = new PrivateObject(Game); var resp = obj.Invoke("CommunityCard4Action", new object[] { FirstPlayer }); current = Game.PlayerPosition[FirstPlayer]; Assert.AreEqual(10, current.ID); }
public void CommunityCard3Action() { InitializeTest(); MonopolyCell current = Game.PlayerPosition[FirstPlayer]; Assert.AreEqual(0, current.ID); PrivateObject obj = new PrivateObject(Game); using (StringReader sr = new StringReader("N")) { Console.SetIn(sr); var resp = obj.Invoke("CommunityCard3Action", new object[] { FirstPlayer }); } current = Game.PlayerPosition[FirstPlayer]; Assert.AreEqual(3, current.ID); }
public void ChanceCard5ActionTest() { InitializeTest(); MonopolyCell current = Game.PlayerPosition[FirstPlayer]; Assert.AreEqual(0, current.ID); PrivateObject obj = new PrivateObject(Game); using (StringReader sr = new StringReader("N")) { Console.SetIn(sr); var resp = obj.Invoke("ChanceCard5Action", new object[] { FirstPlayer }); } current = Game.PlayerPosition[FirstPlayer]; Assert.AreEqual(19, current.ID); Assert.AreEqual(1500, FirstPlayer.TotalMoney); }