猫史档案馆


纯数孤傲

纯数孤傲

Lv.1

电脑、代码、编程 咖啡、衬衫、脱发 程序、异常、断点 人生苦短,我用Python

获赞:3收藏:2浏览:201作品收藏:3

签名:编程!编程!!再编程!!!

回复帖子评论
上一页1 页 / 共 1下一页

跳一跳(有排行榜) 中回复

链接在哪!?

2019-03-08T17:06:10 点赞:0

跳一跳(有排行榜) 中回复

https://ide.cod喵/we/20319358

2019-03-08T17:07:32 点赞:0

【企鹅库】功能强大的企鹅库上线啦,快来看看吧 中回复

https://ide.codemao.cn/we/20319358

这是我的三色库

2019-03-10T09:32:31 点赞:0

【编程小技巧】教大家做《超级计算机》(内含《如何让电脑记住玩家输入的名字》教程) 中回复

谁看得懂下面的代码我拜他为师

import pygame
pygame.init()
screen = pygame.display.set_mode([800,600])
keep_going = True
pic = pygame.image.load("CrazySmile.bcm")
colorkey = pic.get_at((0,0))
pic.set_colorkey(colorkey)
picx = 0
picy = 0
BLACK = (0,0,0)
timer = pygame.time.Clock()
speedx = 5
speedy = 5

while keep_going:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            keep_going = False
    picx += speedx
    picy += speedy

    if picx <= 0 or picx + pic.get_width() >= 800:
        speedx = -speedx
    if picy <= 0 or picy + pic.get_height() >= 600:
        speedy = -speedy

    screen.fill(BLACK)
    screen.blit(pic,(picx,picy))
    pygame.display.update()
    timer.tick(60)

pygame.quit()

2019-03-29T13:16:03 点赞:0

来来来,欣赏欣赏帮Scratch的机构的代码! 中回复

大哥,这不是Python

2019-07-26T11:50:56 点赞:0

【探究】 凑字 中回复

9

 

2019-10-14T20:03:20 点赞:1

【Python作品分享】“和平精英”【作品秀】 中回复

你能不能遵守PEP 8啊

2019-11-02T15:00:04 点赞:0

【Python作品分享】“和平精英”【作品秀】 中回复

改进:

import easygui


easygui.msgbox("你是一个“编程猿”")
easygui.msgbox("天天编“喵”游戏")
easygui.msgbox("有一个被核辐射遍布的岛屿")
easygui.msgbox("每年,都会有许多的叫“和平精英”的大喵来这里跳伞")
easygui.msgbox("但他们没有一个回来的")
easygui.msgbox("有一天,你脑瓜子犯病")
easygui.msgbox("你竟然花钱去作喵,玩“和平精英”")
easygui.msgbox("你加入和平大厅")
easygui.msgbox("人家都穿貂皮大衣,就你一个穿小白衬衫")
a = easygui.buttonbox("你要选择", "", ["充钱", "使用爬虫", "啥都不干"])
if a == "使用爬虫":
    easygui.msgbox("光子把你告上了法庭,你蹲监狱了10年")
elif a == "充钱":
    easygui.msgbox('你得到了一个小蓝衣')
if a == "啥都不干":
    easygui.msgbox('你啥也没有')


def start():
    def portG():
        easygui.msgbox("落地一把信号Q")
        if easygui.ynbox("继续", "", ["继续捡装备", "找辆车,走人"]):
            easygui.msgbox("你捡了一把m416")
            if easygui.buttonbox("你遇到了失落的堪培拉一脚你是否要攻击它", "", ["攻击", "逃跑"]):
                easygui.msgbox("它拿了一把P92,它有100滴血")
                easygui.msgbox("你用m416打了它五喵")
                easygui.msgbox("ta没有血了")
                easygui.msgbox("ta有一把P92,你捡了")
            else:
                h = easygui.buttonbox("你要逃到哪个地方", "", ["医院", "路边茅坑", "P城", "山顶废墟", ])
                if h == "医院":
                    hospital()
                if h == "路边茅坑":
                    latrine()
                if h == "P城":
                    cityP()
                if h == "山顶废墟":
                    ruins()
        else:
            string = easygui.buttonbox("你要跑到哪个地方", "", ["医院", "路边茅坑", "P城", "山顶废墟", ])
            if string == "医院":
                hospital()
            if string == "路边茅坑":
                latrine()
            if string == "P城":
                cityP()
            if string == "山顶废墟":
                ruins()

    def hospital():
        c = "失落的秋日森林一角"
        easygui.msgbox("医院今天异常的穷")
        easygui.msgbox("只有一把S686")
        easygui.msgbox("你遇到了" + c)
        if easygui.ynbox("是否攻击", "", ["是", "否"]):
            easygui.msgbox("他拿了一个98k")
            easygui.msgbox("虽然没有倍镜但是ta会顺狙")
            if easygui.ynbox("请选择", "", ["走位", "进攻"]):
                easygui.msgbox("你通过蛇皮走位,渐渐的打败了ta")
                easygui.msgbox("胜利!")
                d = easygui.buttonbox("你要逃到哪个地方", "", ["路边茅坑", "P城", "山顶废墟", ])
                if d == "路边茅坑":
                    latrine()
                if d == "P城":
                    cityP()
                if d == "山顶废墟":
                    ruins()
            else:
                easygui.msgbox("由于你的经验不够,被他打败了")
                if easygui.ynbox("请选择", "", ["关闭", "重新开始"]):
                    easygui.msgbox("继续")
                else:
                    start()

    def latrine():
        easygui.msgbox("茅房特别肥")
        easygui.msgbox("既然有一把AKM")
        if easygui.buttonbox("路边有一辆蹦蹦", "", ["坐上去", "不坐"]):
            d = easygui.buttonbox("你要跑到哪个地方", "", ["医院", "P城", "山顶废墟", ])
            if d == "医院":
                hospital()
            elif d == "P城":
                cityP()

    def cityP():
        easygui.msgbox("P城发生了人喵发")
        easygui.msgbox("你刚过去")
        easygui.msgbox("就被4个人机打喵啦")
        if easygui.ynbox("请选择", "", ["关闭", "重新开始"]):
            easygui.msgbox("继续")
        else:
            start()

    def ruins():
        easygui.msgbox("你遇到了“失落的梦见未来”")
        easygui.msgbox("ta开了个挂(because他是作者)")

        if easygui.ynbox("是否打他", "", ["打他", "把信号Q给他"]):
            easygui.msgbox("他因为开了挂")
            easygui.msgbox("所以他拿一把∞子弹的信号Q")
            easygui.msgbox("他把你烧喵了")
            if easygui.ynbox("请选择", "", ["关闭", "重新开始"]):
                easygui.msgbox("继续")
            else:
                start()

    def landing():
        string = easygui.buttonbox("你要去哪个地方", "", ["G港", "医院", "路边茅坑", "P城", "山顶废墟", "啥都不干"])
        if string == "医院":
            hospital()
        if string == "G港":
            portG()
        if string == "路边茅坑":
            latrine()
        if string == "P城":
            cityP()
        if string == "山顶废墟":
            ruins()
        if string == "啥都不干":
            easygui.msgbox('你被毒圈包围了')
            if easygui.ynbox("请选择", "", ["关闭", "重新开始"]):
                easygui.msgbox("继续")
            else:
                start()

    if easygui.ynbox("是否开始游戏", "", ["是", "否"]):
        easygui.msgbox("你点击了开始游戏")
        landing()


start()

2019-11-02T15:13:55 点赞:1