public DiceRollModule(DiceRollerService diceRollerService, HungerService hungerService, DiceResultToEmojiConverter emojiConverter, GuildEmoteService guildEmoteService)
 {
     _diceRollerService = diceRollerService;
     _hungerService     = hungerService;
     _emojiConverter    = emojiConverter;
     _guildEmoteService = guildEmoteService;
 }
Beispiel #2
0
        public void RollDice()
        {
            PlayerInfo player = _playerService.GetPlayerById(Context.ConnectionId);

            var diceRoller = new DiceRollerService();

            var results = diceRoller.Roll(player.Dice.Select(i => $"1{i.ToString()}")); //   map { "1$_" }  @sassa

            Clients.Group(player.CurrentRoom).rolledDice(player.Name, results);         // https://xkcd.com/221/
        }