Namespace: GhostWars
Assembly: GhostWars (in GhostWars.exe) Version: 1.1.1.0 (1.1.1)
Tests: GhostWars.Tests.TreeTests
4 unit tests call GhostWars.Tree.Level
Assembly: GhostWars (in GhostWars.exe) Version: 1.1.1.0 (1.1.1)
Syntax
Property Value
Type: Int32Remarks
Examples
[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 UpgradePlayerTree() { var tree = GiveTreeOfTeam(Team.HumanYellow); tree.NumberOfGhosts = GameLogic.GhostsToUpgrade; tree.TryToUpgrade(); Assert.AreEqual(2, tree.Level); }
[Test] public void CannotUpgradeWithoutRequiredGhostCount() { var tree = GiveTreeOfTeam(Team.HumanYellow); tree.NumberOfGhosts = GameLogic.GhostsToUpgrade / 2; tree.TryToUpgrade(); Assert.AreEqual(1, tree.Level); }
See Also