Tree NumberOfGhosts Property Delta Engine Documentation

Namespace: GhostWars
Assembly: GhostWars (in GhostWars.exe) Version: 1.1.1.0 (1.1.1)
Syntax

public int NumberOfGhosts { get; set; }

Property Value

Type: Int32
Remarks

Tests: GhostWars.Tests.TreeTests
Examples

7 unit tests call GhostWars.Tree.NumberOfGhosts
[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