private void InitTokens(PlayerCount playerCount) { switch (playerCount) { case PlayerCount.Four: _boardTokensInternal = new TokenCollection(7, 7, 7, 7, 7, 5); break; case PlayerCount.Three: _boardTokensInternal = new TokenCollection(5, 5, 5, 5, 5, 5); break; case PlayerCount.Two: default: _boardTokensInternal = new TokenCollection(4, 4, 4, 4, 4, 5); break; } }
public static TokenCollection ToCollection(string input) { var output = new TokenCollection(); foreach (char c in input) { var element = char.ToLower(c); if (!_register.Keys.Contains(element)) { var allowedElements = string.Join(",", _register.Keys); var msg = $"Input sequence contains invalid element, accepted elements are [{allowedElements}]"; throw new ArgumentException(msg, nameof(input)); } output.AddTokens(_register[element], 1); } return(output); }
public void CollectTokens(TokenCollection tokens) => _tokensInternal.AddTokens(tokens);
public bool TryTakeTokensFormBoard(TokenCollection tokensToGetFromBoard) => _boardTokensInternal.TryTake(tokensToGetFromBoard);
public void AddTokensToBoard(TokenCollection tokensToReturnToBoard) => _boardTokensInternal.AddTokens(tokensToReturnToBoard);
public TakeTwoSameAction(TokenCollection tokensToTake) { _tokensInternal = tokensToTake; }
public Noble(uint prestige, TokenCollection cost) : this(prestige, new NobleCost(cost)) { }