public void cache_test_gain_during_action_phase() { var player = new Player(1, "b"); var players = new List <IPlayer>() { player }; var supply = new Supply( new List <Pile>() { new Pile(Card.Copper, 10) }, new List <Pile>(), new List <Pile>()); var vc = new VictoryCondition(); var game = new Game.Game(0, players, supply, vc); player.PlayStatus = PlayStatus.ActionPhase; player.Gain(Card.Cache); game.CheckPlayStack(player); var expected = new List <Card> { Card.Cache, Card.Copper, Card.Copper }; Assert.Equal(expected, player.DiscardPile); }
public void survivors_reorder_top_2() { var player = new Player(1, "b"); var players = new List <IPlayer>() { player }; var pileFactory = new PileFactory(1); var supply = new Supply( new List <Pile>(), new List <Pile>(), new List <Pile>()); var vc = new VictoryCondition(); var game = new Game.Game(0, players, supply, vc); player.GainToHand(Card.Survivors); player.Deck.Add(Card.Copper); player.Deck.Add(Card.Silver); player.PlayStatus = PlayStatus.ActionPhase; player.NumberOfActions++; game.Submit(player.PlayerName, PlayerAction.Play, Card.Survivors); game.Submit(player.PlayerName, ActionRequestType.SelectOptions, new List <ActionResponse> { ActionResponse.Put }); game.Submit(player.PlayerName, ActionRequestType.SelectCards, new List <Card> { Card.Silver, Card.Copper }); game.CheckPlayStack(player); var expected = new List <Card> { Card.Silver, Card.Copper }; Assert.Equal(expected, player.Deck); }
public void ducat_is_gained_in_action_phase() { var player = new Player(1, "b"); var players = new List <IPlayer>() { player }; var supply = new Supply( new List <Pile>(), new List <Pile>(), new List <Pile>()); var vc = new VictoryCondition(); var game = new Game.Game(0, players, supply, vc); player.PlayStatus = PlayStatus.ActionPhase; player.GainToHand(Card.Copper); player.GainToHand(Card.Ducat); game.CheckPlayStack(player); game.Submit(player.PlayerName, ActionRequestType.YesNo, ActionResponse.Yes); Assert.Equal(PlayStatus.ActionPhase, player.PlayStatus); Assert.Single(player.Hand); Assert.Single(supply.Trash); }
public void lighthouse_is_played() { var player = new Player(1, "b"); var players = new List <IPlayer>() { player }; var supply = new Supply( new List <Pile>(), new List <Pile>(), new List <Pile>()); var vc = new VictoryCondition(); var game = new Game.Game(0, players, supply, vc); player.GainToHand(Card.Lighthouse); player.PlayStatus = PlayStatus.ActionPhase; game.Submit(player.PlayerName, PlayerAction.Play, Card.Lighthouse); Assert.Equal(1, player.MoneyPlayed); player.EndTurn(); player.StartTurn(game); game.CheckPlayStack(player); Assert.Equal(1, player.MoneyPlayed); }