Namespace: GhostWars
Assembly: GhostWars (in GhostWars.exe) Version: 1.1.1.0 (1.1.1)
Tests: GhostWars.Tests.TreeTests
7 unit tests call GhostWars.Tree.NumberOfGhosts
Assembly: GhostWars (in GhostWars.exe) Version: 1.1.1.0 (1.1.1)
Syntax
Property Value
Type: Int32Remarks
Examples
[Test] public void AdvancingByGrowthIntervalIncreasesGhosts() { var tree = GiveTreeOfTeam(Team.ComputerTeal); var originalGhostCount = tree.NumberOfGhosts; MainMenu.State = GameState.Game; AdvanceTimeAndUpdateEntities(2); Assert.AreEqual(originalGhostCount + 1, tree.NumberOfGhosts); }
[Test] public void AttackEmptyTreeCostsUsedGhostsAndTurnsTeam() { var tree = GiveTreeOfTeam(); tree.Attack(Team.HumanYellow, 5); Assert.AreEqual(Team.HumanYellow, tree.CurrentTeam); Assert.AreEqual(0, tree.NumberOfGhosts); }
[Test] public void AttackSameTeamTreeAddsGhosts() { var tree = GiveTreeOfTeam(Team.HumanYellow); var originalCount = tree.NumberOfGhosts; var waveGhosts = 4; tree.Attack(Team.HumanYellow, waveGhosts); Assert.AreEqual(originalCount + waveGhosts, tree.NumberOfGhosts); }
See Also