SG_DiceRoll_AoN_Bot.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:SolutionGambling 作者: eganwall 项目源码 文件源码
def play_dice(wager_amount):
    die_result = roll_die()

    if (die_result > 2):
        outcome = SG_Repository.WagerOutcome.WIN
        winnings = wager_amount * pay_table[die_result]
    else:
        outcome = SG_Repository.WagerOutcome.LOSE
        winnings = 0

    wager_result = {'die_roll_result' : die_result, 'outcome' : outcome,
                    'winnings' : winnings}

    print("All-or-nothing die roll wager result:")
    pprint.pprint(wager_result)

    return wager_result

# create our Reddit instance
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号