コード例 #1
0
 private void ApplyRules(Player player, UnoCard card)
 {
     foreach (var rule in _cardBehaviourRules)
     {
         rule.Apply(player, card);
     }
 }
コード例 #2
0
 private bool CanPlayCommand(Player player, UnoCard card)
 {
     return((PlayerToPlay == player && (card.Id == Last.Id ||
                                        card.Color == Last.Color ||
                                        card.IsWild)) ||
            (card.Equals(Last)));
 }
コード例 #3
0
 public void Apply(Player player, UnoCard card)
 {
     if (_canPlayCommand(player, card))
     {
         _playedCardSet.Push(card);
     }
 }
コード例 #4
0
		private void PlayCommand(Player player, UnoCard card)
		{
			foreach (var rule in _rules)
			{
				rule.Apply(player, card);				
			}		
		}
コード例 #5
0
		public void Apply(Player player, UnoCard card)
		{
			if (_canPlayCommand(player, card))
			{
				_playedCardSet.Push(card);
			}
		}
コード例 #6
0
 public void Plays(UnoCard card)
 {
     //if (canPlayCommand(player, card))
     {
         playCommand(player, card);
     }
 }
コード例 #7
0
		private bool CanPlayCommand(Player player, UnoCard card)
		{
			return (PlayerToPlay == player && (card.Id == Last.Id 
						|| card.Color == Last.Color
						|| card.IsWild))
						|| (card.Equals(Last));
		}
コード例 #8
0
 private void PlayCommand(Player player, UnoCard card)
 {
     foreach (var rule in _rules)
     {
         rule.Apply(player, card);
     }
 }
コード例 #9
0
		public void Plays(UnoCard card)
		{
			//if (canPlayCommand(player, card))
			{
				playCommand(player, card);
			}
		}
コード例 #10
0
 public void Apply(Player player, UnoCard card)
 {
     if (card.Id == UnoCardId.Jump)
     {
         turn.IncTurn();
     }
 }
コード例 #11
0
		private void ApplyRules(Player player, UnoCard card)
		{
			foreach (var rule in _cardBehaviourRules)
			{
				rule.Apply(player, card);
			}
		}
コード例 #12
0
		public void Apply(Player player, UnoCard card)
		{
			int index = 0;
			while (index < _playedCardSet.Count && card.Equals(_playedCardSet.ElementAt(index)))
			{
				ApplyRules(player, card);
				index++;
			}			
		}
コード例 #13
0
        public void Apply(Player player, UnoCard card)
        {
            int index = 0;

            while (index < _playedCardSet.Count && card.Equals(_playedCardSet.ElementAt(index)))
            {
                ApplyRules(player, card);
                index++;
            }
        }
コード例 #14
0
 internal bool CanPlay(UnoCard unoCard)
 {
     return(true);            //canPlayCommand(player, unoCard);
 }
コード例 #15
0
 public UnoCardParser(UnoCardId id, UnoColor color)
 {
     Card = new UnoCard(id, color);
 }
コード例 #16
0
 public void Apply(Player player, UnoCard card)
 {
     _playedCardSet.Push(card);
 }
コード例 #17
0
		public UnoCardParser(UnoCardId id, UnoColor color)
		{
			Card = new UnoCard(id, color);
		}
コード例 #18
0
		internal bool CanPlay(UnoCard unoCard)
		{
			return true; //canPlayCommand(player, unoCard);
		}
コード例 #19
0
		public void Apply(Player player, UnoCard card)
		{
			_playedCardSet.Push(card);
		}
コード例 #20
0
		public void Apply(Player player, UnoCard card)
		{
			if (card.Id == UnoCardId.Jump) turn.IncTurn();
		}