public void TestBasicSupplyAmount() { var baratheon = new Player(HouseName.Baratheon); var lannister = new Player(HouseName.Lannister); var stark = new Player(HouseName.Stark); var track = new SupplyTrack(null); track.Add(baratheon, supply: 2); track.Add(lannister, supply: 2); track.Add(stark, supply: 1); track.GetSupply(baratheon).Should().Be(2); track.GetSupply(lannister).Should().Be(2); track.GetSupply(stark) .Should().Be(1); }
public void TestMinimumSupply() { var baratheon = new Player(HouseName.Baratheon); var lannister = new Player(HouseName.Lannister); var stark = new Player(HouseName.Stark); var track = new SupplyTrack(null); track.Add(baratheon, supply: 2); track.Add(lannister, supply: 2); track.Add(stark, supply: 1); Action set = () => track.Set(stark, supply: -1); set.ShouldThrow<ArgumentOutOfRangeException>("because 0 is the minimum supply level."); track.GetSupply(baratheon).Should().Be(2); track.GetSupply(lannister).Should().Be(2); track.GetSupply(stark).Should().Be(1); }
public void TestSharedSupplyLevels() { var baratheon = new Player(HouseName.Baratheon); var lannister = new Player(HouseName.Lannister); var stark = new Player(HouseName.Stark); var tyrell = new Player(HouseName.Tyrell); var greyjoy = new Player(HouseName.Greyjoy); var martell = new Player(HouseName.Martell); var track = new SupplyTrack(null); track.Add(baratheon, supply: 2); track.Add(lannister, supply: 2); track.Add(stark, supply: 2); track.Add(tyrell, supply: 2); track.Add(greyjoy, supply: 2); track.Add(martell, supply: 2); track.GetSupply(baratheon).Should().Be(2); track.GetSupply(lannister).Should().Be(2); track.GetSupply(stark) .Should().Be(2); track.GetSupply(tyrell) .Should().Be(2); track.GetSupply(greyjoy) .Should().Be(2); track.GetSupply(martell) .Should().Be(2); }