private void ApplyRules(Player player, UnoCard card) { foreach (var rule in _cardBehaviourRules) { rule.Apply(player, card); } }
private bool CanPlayCommand(Player player, UnoCard card) { return((PlayerToPlay == player && (card.Id == Last.Id || card.Color == Last.Color || card.IsWild)) || (card.Equals(Last))); }
public void Apply(Player player, UnoCard card) { if (_canPlayCommand(player, card)) { _playedCardSet.Push(card); } }
private void PlayCommand(Player player, UnoCard card) { foreach (var rule in _rules) { rule.Apply(player, card); } }
public void Plays(UnoCard card) { //if (canPlayCommand(player, card)) { playCommand(player, card); } }
private bool CanPlayCommand(Player player, UnoCard card) { return (PlayerToPlay == player && (card.Id == Last.Id || card.Color == Last.Color || card.IsWild)) || (card.Equals(Last)); }
public void Apply(Player player, UnoCard card) { if (card.Id == UnoCardId.Jump) { turn.IncTurn(); } }
public void Apply(Player player, UnoCard card) { int index = 0; while (index < _playedCardSet.Count && card.Equals(_playedCardSet.ElementAt(index))) { ApplyRules(player, card); index++; } }
internal bool CanPlay(UnoCard unoCard) { return(true); //canPlayCommand(player, unoCard); }
public UnoCardParser(UnoCardId id, UnoColor color) { Card = new UnoCard(id, color); }
public void Apply(Player player, UnoCard card) { _playedCardSet.Push(card); }
internal bool CanPlay(UnoCard unoCard) { return true; //canPlayCommand(player, unoCard); }
public void Apply(Player player, UnoCard card) { if (card.Id == UnoCardId.Jump) turn.IncTurn(); }