Esempio n. 1
0
        public static async Task Hit(SocketCommandContext Context, BlackjackGame game)
        {
            int value = game.Hit();

            if (value < 22)
            {
                await GameContinue(Context, game);
            }

            else
            {
                await GameEnd(Context, game);
            }
        }
Esempio n. 2
0
        public static async Task DoubleDown(SocketCommandContext Context, BlackjackGame game)
        {
            try
            {
                await BalanceDb.AddToasties(Context.User.Id, -game.Toasties, Context.Guild.Id);

                game.Toasties *= 2;
                game.Hit();
                await Stand(Context, game);
            }
            catch (Exception e)
            {
                await Context.Channel.SendMessageAsync(e.Message);
            }
        }