Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }