public void MappingIntoABustBusts() { Game gameFixture = new Game(); Card FiveOfMaps = new Card { Suit = Suites.Maps, Value = 5 }; Card SevenOfMaps = new Card() { Suit = Suites.Maps, Value = 7 }; GameHelpers.BringCardFromDeckToField(ref gameFixture, FiveOfMaps); GameHelpers.ClearDiscardPile(ref gameFixture); GameHelpers.BringCardFromDeckToDiscardPile(ref gameFixture, SevenOfMaps); GameHelpers.SetCurrentActions(ref gameFixture, new List <Actions> { Actions.ChooseMapTarget }); gameFixture.GetMapCards(); gameFixture.TakeAction(Actions.ChooseMapTarget, SevenOfMaps); gameFixture.CurrentAvailableActions.Should().BeEquivalentTo( new List <Actions>() { Actions.Draw }, options => options.WithoutStrictOrdering()); gameFixture.Field.Count.Should().Be(0); gameFixture.CurrentPlayersTurn.Should().Be(Players.PlayerTwo); gameFixture.ScoreZones[0].PointsShowing().Should().Be(0); gameFixture.DiscardPile.Count.Should().Be(2); }
public void AskingForMapCardsReturnsThree() { Game gameFixture = new Game(); Card FiveOfMaps = new Card { Suit = Suites.Maps, Value = 5 }; Card FiveOfKeys = new Card { Suit = Suites.Keys, Value = 5 }; Card FiveOfCannons = new Card { Suit = Suites.Cannons, Value = 5 }; Card FiveOfChests = new Card { Suit = Suites.Chests, Value = 5 }; GameHelpers.BringCardFromDeckToField(ref gameFixture, FiveOfMaps); GameHelpers.ClearDiscardPile(ref gameFixture); GameHelpers.BringCardFromDeckToDiscardPile(ref gameFixture, FiveOfKeys); GameHelpers.BringCardFromDeckToDiscardPile(ref gameFixture, FiveOfChests); GameHelpers.BringCardFromDeckToDiscardPile(ref gameFixture, FiveOfCannons); GameHelpers.SetCurrentActions(ref gameFixture, new List <Actions> { Actions.ChooseMapTarget }); var actual = gameFixture.GetMapCards(); actual.Should().BeEquivalentTo(new List <Card> { FiveOfKeys, FiveOfChests, FiveOfCannons }, options => options.WithoutStrictOrdering()); }
public void TakingBothAChestAndAKeyWhenTheDiscardIsLowYeildsAsMuchAsPossible() { Game gameFixture = new Game(); Card FiveOfKeys = new Card { Suit = Suites.Keys, Value = 5 }; Card FiveOfChests = new Card { Suit = Suites.Chests, Value = 5 }; GameHelpers.BringCardFromDeckToField(ref gameFixture, FiveOfKeys); GameHelpers.BringCardFromDeckToField(ref gameFixture, FiveOfChests); GameHelpers.ClearDiscardPile(ref gameFixture); GameHelpers.BringCardFromDeckToDiscardPile(ref gameFixture, new Card { Suit = Suites.Oracles, Value = 5 }); GameHelpers.SetCurrentActions(ref gameFixture, new List <Actions> { Actions.TakeAll }); gameFixture.TakeAction(Actions.TakeAll); gameFixture.ScoreZones[0].PointsShowing().Should().Be(15); gameFixture.DiscardPile.Count.Should().Be(0); }
public void DrawingAMapWhenTheDiscardPileHasOneCardStillWorks() { Game gameFixture = new Game(); Card FiveOfMaps = new Card { Suit = Suites.Maps, Value = 5 }; Card FiveOfKeys = new Card { Suit = Suites.Keys, Value = 5 }; GameHelpers.BringCardToPositionInDeck(ref gameFixture, FiveOfMaps, 0); GameHelpers.ClearDiscardPile(ref gameFixture); GameHelpers.BringCardFromDeckToDiscardPile(ref gameFixture, FiveOfKeys); gameFixture.TakeAction(Actions.Draw); gameFixture.CurrentAvailableActions.Should().BeEquivalentTo( new List <Actions>() { Actions.ChooseMapTarget }); }
public void ChoosingATargetBringsThatCardIntoTheField() { Game gameFixture = new Game(); Card FiveOfMaps = new Card { Suit = Suites.Maps, Value = 5 }; Card FiveOfKeys = new Card { Suit = Suites.Keys, Value = 5 }; GameHelpers.BringCardFromDeckToField(ref gameFixture, FiveOfMaps); GameHelpers.ClearDiscardPile(ref gameFixture); GameHelpers.BringCardFromDeckToDiscardPile(ref gameFixture, FiveOfKeys); GameHelpers.BringCardFromDeckToDiscardPile(ref gameFixture, new Card() { Suit = Suites.Chests, Value = 5 }); GameHelpers.BringCardFromDeckToDiscardPile(ref gameFixture, new Card() { Suit = Suites.Cannons, Value = 5 }); GameHelpers.SetCurrentActions(ref gameFixture, new List <Actions> { Actions.ChooseMapTarget }); gameFixture.GetMapCards(); gameFixture.TakeAction(Actions.ChooseMapTarget, FiveOfKeys); gameFixture.Field.Count.Should().Be(2); gameFixture.Field[1].Should().BeEquivalentTo(FiveOfKeys); gameFixture.DiscardPile.Count.Should().Be(2); gameFixture.CurrentAvailableActions.Should().BeEquivalentTo( new List <Actions>() { Actions.Draw, Actions.TakeAll }, options => options.WithoutStrictOrdering()); }
public void BustingWithBothAChestAndAKeyBehindAnAnchorStillGetsABonus() { Game gameFixture = new Game(); Card FiveOfKeys = new Card { Suit = Suites.Keys, Value = 5 }; Card FiveOfChests = new Card { Suit = Suites.Chests, Value = 5 }; GameHelpers.ClearDiscardPile(ref gameFixture); GameHelpers.BringCardFromDeckToField(ref gameFixture, FiveOfKeys); GameHelpers.BringCardFromDeckToField(ref gameFixture, FiveOfChests); GameHelpers.BringCardFromDeckToField(ref gameFixture, new Card { Suit = Suites.Anchors, Value = 5 }); GameHelpers.BringCardFromDeckToField(ref gameFixture, new Card { Suit = Suites.Mermaids, Value = 5 }); GameHelpers.BringCardToPositionInDeck(ref gameFixture, new Card { Suit = Suites.Mermaids, Value = 9 }, 0); GameHelpers.BringCardFromDeckToDiscardPile(ref gameFixture, new Card { Suit = Suites.Oracles, Value = 5 }); GameHelpers.SetCurrentActions(ref gameFixture, new List <Actions> { Actions.Draw }); gameFixture.TakeAction(Actions.Draw); gameFixture.ScoreZones[0].PointsShowing().Should().Be(15); gameFixture.ScoreZones[0].HighestOfSuit(Suites.Keys).Value.Should().Be(5); gameFixture.ScoreZones[0].HighestOfSuit(Suites.Chests).Value.Should().Be(5); gameFixture.ScoreZones[0].HighestOfSuit(Suites.Oracles).Value.Should().Be(5); gameFixture.DiscardPile.Count.Should().Be(3); }