python简单的青蛙旅行小游戏

本文章已经生成可运行项目,

青蛙旅行小游戏

'''
    青蛙旅行
'''

import os,time,sys,random
frog_bag =[['Foods',1],['Water',1],['Medicine',1],['Games',1]]
frog_refrigerator = [['Foods',1],['Water',1],['Medicine',1],['Games',1]]
player_bag = [10, [['Foods',2],['Water',2],['Medicine',2],['Games',2]]]
clove_count = 0
frog_life = 3
frog_name = []
#进入游戏

while True:
    os.system('cls')
    print("")
    print("☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★")
    print("")
    print("       Welcome to the frog trip!")
    print("")
    print("☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★")
    print("")

    while 1:
        #判断是否注册
        if  not frog_name:
            print("Please give your little frog a name!")
            frog_name1=input("Plseas:")
            print("Your frog's name is:",frog_name1)
            print("Agree or not?")
            frog_name_choice = input("Please(Y/N):")
            #确认昵称
            if frog_name_choice == 'Y':
                print("Registered successfully!")
                frog_name.append(frog_name1)
                print("Your frog's name is:",frog_name[0])
                input("About to return to the superior menu...")
                os.system('cls')
                break
            else:
                print("Please input again!")
                continue
        else:
            break
    break

#游戏选择功能界面
while True:
    os.system('cls')
    print("")
    print("☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★")
    print("")
    print("       Welcome to the frog trip!")
    print("")
    print("☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★")
    print("")
    print("           HOME PAGE")
    print("     1.Open the bag ")
    print("     2.Open the refrigerator")
    print("     3.Collect the clove  ")
    print("     4.Open the shop ")
    print("     5.Enter the cabin ")
    print("     6.Log out  ")
    print("  ")
    print("Please select ")
    player_choice = input("Please:")

    #功能选择
    #打开背包
    if player_choice == '1':
        while 1:
            os.system('cls')
            print("")
            print("☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★")
            print("")
            print("       Welcome to the frog's bag!")
            print("")
            print("~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*")
            print("")
            print("Stock:",frog_bag)
            print("")
            print("☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★")
            print("")
            print("     1.Increase the items  ")
            print("     2.Return to previous menu")
            print("")
            print("Please select ")
            player_choice = input("Please:")

            #添加物品
            if player_choice == '1':
                while 1:
                    os.system('cls')
                    #青蛙背包
                    print("")
                    print("                Frog_bag")
                    print("~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*")
                    print("")
                    print(frog_bag)
                    print("")
                    print("~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*")
                    print("")
                    #玩家背包
                    print("                Player_bag")
                    print("~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*")
                    print("")
                    print(player_bag)
                    print("")
                    print("~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*")
                    print("")
                    #展示食物选择
                    print("  List of optional items")
                    print("     1.Foods ")
                    print("     2.Tirsty")
                    print("     3.Medicine ")
                    print("     4.Games")
                    print("     5.Return to previous menu")
                    print("")
                    player_choice = input("Please enter the items to be added:")

                    #选择添加的食物
                    if player_choice == '1':
    
本文章已经生成可运行项目
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值