创建3个游戏人物,以及三个游戏场景,模拟游戏场景

class Game_person:
    def __init__(self,name,sex,age,fighting):
        self.G_name = name
        self.G_sex = sex
        self.G_age = age
        self.G_fighting = fighting
    def Game_scene1(self):
        self.G_fighting = self.G_fighting - 200
        return self.G_fighting
    def Game_scene2(self):
        self.G_fighting = self.G_fighting + 100
        return self.G_fighting
    def Game_scene3(self):
        self.G_fighting = self.G_fighting -500
        return self.G_fighting
player1 = Game_person('小A','女',18,1000)
player2 = Game_person('小B','男',20,1800)
player3 = Game_person('小C','女',19,2500)
print("-"*10 + "游戏开始" +"-"*10)
print("请选择游戏人物:")
print("1."+"小A,女,18,初始战斗力1000")
print("2."+"小B,男,20,初始战斗力1800")
print("3."+"小C,女,19,初始战斗力2500")
figure = int(input())
if figure == 1:
    print("请选择游戏场景:(1.草丛战斗 2.自我修炼 3. 多人游戏)")
    scene1 = int(input())
    while scene1 == 1:
        player1.Game_scene1()
        print("战斗结束"+"\n",player1.G_name,player1.G_sex,player1.G_age,"剩余战斗力:",player1.G_fighting)
        if player1.G_fighting <=0 :
            print("战斗力小于0,游戏结束")
            break
        print("是否继续:1.继续 2.退出")
        continue1 = int(input())
        if continue1 == 1:
            print("请选择游戏场景:(1.草丛战斗 2.自我修炼 3. 多人游戏)")
            scene1 = int(input())
            if scene1 == 2:
                player1.Game_scene2()
                print("修炼结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
                print("是否继续:1.继续 2.退出")
                continue2 = int(input())
                if continue2 == 1:
                    print("请选择游戏场景:(1.草丛战斗 2.自我修炼 3. 多人游戏)")
                    scene1 = int(input())
                else : break
            if scene1 == 3:
                player1.Game_scene3()
                print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
            if scene1 == 2:
                player1.Game_scene2()
                print("修炼结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
            if scene1 == 1:
                player1.Game_scene1()
                print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
            print("是否继续:1.继续 2.退出")
            continue2 = int(input())
            if continue2 == 1:
                print("请选择游戏场景:(1.草丛战斗 2.自我修炼 3. 多人游戏)")
                scene1 = int(input())
            else:
                    break
        else : break
    while scene1 == 2:
        player1.Game_scene2()
        print("修炼结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
        print("是否继续:1.继续 2.退出")
        continue2 = int(input())
        if continue2 == 1:
            print("请选择游戏场景:(1.草丛战斗 2.自我修炼 3. 多人游戏)")
            scene1 = int(input())
        else:
            break
        if scene1 == 3:
            player1.Game_scene3()
            print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
        if scene1 == 2:
            player1.Game_scene2()
            print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
        if scene1 == 1:
            player1.Game_scene1()
            print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
        print("是否继续:1.继续 2.退出")
        continue2 = int(input())
        if continue2 == 1:
            print("请选择游戏场景:(1.草丛战斗 2.自我修炼 3. 多人游戏)")
            scene1 = int(input())
        else:
            break
    while scene1 == 3:
        player1.Game_scene3()
        print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
        print("是否继续:1.继续 2.退出")
        continue2 = int(input())
        if continue2 == 1:
            print("请选择游戏场景:(1.草丛战斗 2.自我修炼 3. 多人游戏)")
            scene1 = int(input())
        else:
            break
        if scene1 == 3:
            player1.Game_scene3()
            print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
        if scene1 == 2:
            player1.Game_scene2()
            print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
        if scene1 == 3:
            player1.Game_scene3()
            print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
        print("是否继续:1.继续 2.退出")
        continue2 = int(input())
        if continue2 == 1:
            print("请选择游戏场景:(1.草丛战斗 2.自我修炼 3. 多人游戏)")
            scene1 = int(input())
        else:
            break
if figure == 2:
    print("请选择游戏场景:(1.草丛战斗 2.自我修炼 3. 多人游戏)")
    scene1 = int(input())
    while scene1 == 1:
        player1.Game_scene1()
        print("战斗结束"+"\n",player1.G_name,player1.G_sex,player1.G_age,"剩余战斗力:",player1.G_fighting)
        if player1.G_fighting <=0 :
            print("战斗力小于0,游戏结束")
            break
        print("是否继续:1.继续 2.退出")
        continue1 = int(input())
        if continue1 == 1:
            print("请选择游戏场景:(1.草丛战斗 2.自我修炼 3. 多人游戏)")
            scene1 = int(input())
            if scene1 == 2:
                player1.Game_scene2()
                print("修炼结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
                print("是否继续:1.继续 2.退出")
                continue2 = int(input())
                if continue2 == 1:
                    print("请选择游戏场景:(1.草丛战斗 2.自我修炼 3. 多人游戏)")
                    scene1 = int(input())
                else : break
            if scene1 == 3:
                player1.Game_scene3()
                print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
            if scene1 == 2:
                player1.Game_scene2()
                print("修炼结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
            if scene1 == 1:
                player1.Game_scene1()
                print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
            print("是否继续:1.继续 2.退出")
            continue2 = int(input())
            if continue2 == 1:
                print("请选择游戏场景:(1.草丛战斗 2.自我修炼 3. 多人游戏)")
                scene1 = int(input())
            else:
                    break
        else : break
    while scene1 == 2:
        player1.Game_scene2()
        print("修炼结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
        print("是否继续:1.继续 2.退出")
        continue2 = int(input())
        if continue2 == 1:
            print("请选择游戏场景:(1.草丛战斗 2.自我修炼 3. 多人游戏)")
            scene1 = int(input())
        else:
            break
        if scene1 == 3:
            player1.Game_scene3()
            print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
        if scene1 == 2:
            player1.Game_scene2()
            print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
        if scene1 == 1:
            player1.Game_scene1()
            print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
        print("是否继续:1.继续 2.退出")
        continue2 = int(input())
        if continue2 == 1:
            print("请选择游戏场景:(1.草丛战斗 2.自我修炼 3. 多人游戏)")
            scene1 = int(input())
        else:
            break
    while scene1 == 3:
        player1.Game_scene3()
        print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
        print("是否继续:1.继续 2.退出")
        continue2 = int(input())
        if continue2 == 1:
            print("请选择游戏场景:(1.草丛战斗 2.自我修炼 3. 多人游戏)")
            scene1 = int(input())
        else:
            break
        if scene1 == 3:
            player1.Game_scene3()
            print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
        if scene1 == 2:
            player1.Game_scene2()
            print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
        if scene1 == 3:
            player1.Game_scene3()
            print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
        print("是否继续:1.继续 2.退出")
        continue2 = int(input())
        if continue2 == 1:
            print("请选择游戏场景:(1.草丛战斗 2.自我修炼 3. 多人游戏)")
            scene1 = int(input())
        else:
            break
if figure == 3:
    print("请选择游戏场景:(1.草丛战斗 2.自我修炼 3. 多人游戏)")
    scene1 = int(input())
    while scene1 == 1:
        player1.Game_scene1()
        print("战斗结束"+"\n",player1.G_name,player1.G_sex,player1.G_age,"剩余战斗力:",player1.G_fighting)
        if player1.G_fighting <=0 :
            print("战斗力小于0,游戏结束")
            break
        print("是否继续:1.继续 2.退出")
        continue1 = int(input())
        if continue1 == 1:
            print("请选择游戏场景:(1.草丛战斗 2.自我修炼 3. 多人游戏)")
            scene1 = int(input())
            if scene1 == 2:
                player1.Game_scene2()
                print("修炼结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
                print("是否继续:1.继续 2.退出")
                continue2 = int(input())
                if continue2 == 1:
                    print("请选择游戏场景:(1.草丛战斗 2.自我修炼 3. 多人游戏)")
                    scene1 = int(input())
                else : break
            if scene1 == 3:
                player1.Game_scene3()
                print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
            if scene1 == 2:
                player1.Game_scene2()
                print("修炼结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
            if scene1 == 1:
                player1.Game_scene1()
                print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
            print("是否继续:1.继续 2.退出")
            continue2 = int(input())
            if continue2 == 1:
                print("请选择游戏场景:(1.草丛战斗 2.自我修炼 3. 多人游戏)")
                scene1 = int(input())
            else:
                    break
        else : break
    while scene1 == 2:
        player1.Game_scene2()
        print("修炼结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
        print("是否继续:1.继续 2.退出")
        continue2 = int(input())
        if continue2 == 1:
            print("请选择游戏场景:(1.草丛战斗 2.自我修炼 3. 多人游戏)")
            scene1 = int(input())
        else:
            break
        if scene1 == 3:
            player1.Game_scene3()
            print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
        if scene1 == 2:
            player1.Game_scene2()
            print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
        if scene1 == 1:
            player1.Game_scene1()
            print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
        print("是否继续:1.继续 2.退出")
        continue2 = int(input())
        if continue2 == 1:
            print("请选择游戏场景:(1.草丛战斗 2.自我修炼 3. 多人游戏)")
            scene1 = int(input())
        else:
            break
    while scene1 == 3:
        player1.Game_scene3()
        print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
        print("是否继续:1.继续 2.退出")
        continue2 = int(input())
        if continue2 == 1:
            print("请选择游戏场景:(1.草丛战斗 2.自我修炼 3. 多人游戏)")
            scene1 = int(input())
        else:
            break
        if scene1 == 3:
            player1.Game_scene3()
            print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
        if scene1 == 2:
            player1.Game_scene2()
            print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
        if scene1 == 3:
            player1.Game_scene3()
            print("游戏结束" + "\n", player1.G_name, player1.G_sex, player1.G_age, "剩余战斗力:", player1.G_fighting)
        print("是否继续:1.继续 2.退出")
        continue2 = int(input())
        if continue2 == 1:
            print("请选择游戏场景:(1.草丛战斗 2.自我修炼 3. 多人游戏)")
            scene1 = int(input())
        else:
            break

有以下三个游戏人物有如下属性:
姓名,性别,年龄,战斗力
小A,女,18,1000
小B,男,20,1800
小C,女,19,2500
选择游戏人物在以下三个游戏场景中模拟游戏:
1.草丛战斗(-200战斗力)
2.自我修炼(+100战斗力)
3.多人游戏(-500战斗)