public IRoundPlayerState EndTurn(IDiscardablePlayerState player, IList <IDiscardedCardState> roundDiscard, bool OutOfRound = false, bool IsProtected = false) { roundDiscard.Add(player.TurnDiscard); IList <IDiscardableCardState> turnHand = null; var roundPlayer = new PlayerState(player.Id, roundDiscard, turnHand, outOfRound: false, points: 0, roundHand: null, turnDiscard: null); return(roundPlayer); }
public IDrawableTurnState CreateTurn(IRoundPlayerState playerState, IDrawableCardState turnDeck) { var turnPlayer = _playerFactory.CreateTurnPlayer(playerState); IDiscardablePlayerState discardablePlayer = null; ITargetablePlayerState targetPlayer = null; var turnState = new TurnState(turnDeck, turnPlayer, discardablePlayer, targetPlayer); return(turnState); }
public TurnState(IDrawableCardState turnDeck, IDrawablePlayerState drawablePlayerState = null, IDiscardablePlayerState discardablePlayer = null, ITargetablePlayerState targetPlayer = null) { TurnDeck = turnDeck; DrawablePlayerState = drawablePlayerState; DiscardablePlayer = discardablePlayer; TargetPlayer = targetPlayer; }