public bool TryGetRoleCard(Roles currentRole, out RoleCard roleCard) { // TODO: add find with max money roleCard = _status.RoleCards.FirstOrDefault(x => x.Role == currentRole && !x.IsUsed); return roleCard != null; }
public Roles DoSelectRoleAction(RoleCard card) { if (card.IsUsed) { throw new InvalidOperationException("Role card is used"); } var data = card.Take(); _playerStatus.ReceiveDoubloons(data.Item2); return data.Item1; }
public void OnPlayerSelectRoleHandler(RoleCard roleCard, int id, string name) { Console.WriteLine($"{name}[{id}]: {roleCard.Role}"); }