public UnoGame(Stack<UnoCard> playedCardSet, params string[] playernames) { _playedCardSet = playedCardSet; _players = new List<Player>(); foreach (var name in playernames) { _players.Add(new Player(name)); } _turn = new Turn(_players); _rules = new IRule[] { new InterruptionStealTurn(_turn), new PlayCardPushCardIfAllowed(playedCardSet, CanPlayCommand), new PlayCardUpdateTurnToNextPlayer(_turn), new CumulSameCardBehaviour( new IRule[] { new JumpUpdateTurnToNextPlayer(_turn), }, playedCardSet ), }; }
public JumpUpdateTurnToNextPlayer(Turn turn) { this.turn = turn; }