Tree CurrentTeam Property Delta Engine Documentation

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

public Team CurrentTeam { get; }

Property Value

Type: Team
Remarks

Tests: GhostWars.Tests.TreeTests
Examples

4 unit tests call GhostWars.Tree.CurrentTeam
[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 AttackEnemyCountered()
{
    var tree = GiveTreeOfTeam(Team.HumanYellow);
    tree.Level = 2;
    const int OriginalCount = 60;
    tree.NumberOfGhosts = OriginalCount;
    const int WaveCount = 5;
    tree.Attack(Team.ComputerTeal, WaveCount);
    Assert.AreEqual(Team.HumanYellow, tree.CurrentTeam);
}
[Test]
public void AttackEnemySuccessfullyConquering()
{
    var tree = GiveTreeOfTeam(Team.ComputerPurple);
    const int OriginalCount = 2;
    tree.NumberOfGhosts = OriginalCount;
    const int WaveCount = 5;
    tree.Attack(Team.HumanYellow, WaveCount);
    Assert.AreEqual(Team.HumanYellow, tree.CurrentTeam);
    Assert.AreEqual(0, tree.NumberOfGhosts);
}
See Also