コード例 #1
0
		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
				),
			};
		}
コード例 #2
0
 public JumpUpdateTurnToNextPlayer(Turn turn)
 {
     this.turn = turn;
 }
コード例 #3
0
		public JumpUpdateTurnToNextPlayer(Turn turn)
		{
			this.turn = turn;
		}