예제 #1
0
        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;
        }
예제 #2
0
        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;
        }
예제 #3
0
 public void OnPlayerSelectRoleHandler(RoleCard roleCard, int id, string name)
 {
     Console.WriteLine($"{name}[{id}]: {roleCard.Role}");
 }