https://i.cnblogs.com/settings
摘要: turtle的绘图窗体 turtle.setup(width , height startx , starty) 设置窗体大小及位置 turtle空间坐标体系 turtle.goto (x , y) import turtle turtle.goto ( 100 , 100) turtle.goto 阅读全文
posted @ 2019-11-12 14:24 LLLN 阅读(242) 评论(0) 推荐(0)
摘要: import time #引入时间库 scale = 50 #执行次数 print("执行开始".center(scale//2,"-")) #<字符串>.center(scale//2,”-“):将字符串居中,并将“-”填充在字符串的两侧空白处,scale为控制字符串所占的字节数。 start = 阅读全文
posted @ 2019-11-12 10:46 LLLN 阅读(301) 评论(0) 推荐(0)
摘要: 1 ''' 2 新增功能: 3 优化:1.如果子弹碰到墙壁,让子弹消失 4 2.最多可以发射3颗子弹,不能一直发射 5 6 ''' 7 #导入pygame模块 8 import pygame,time,random 9 SCREEN_WIDTH=700 10 SCREEN_HEIGHT=500 11 阅读全文
posted @ 2019-11-12 10:26 LLLN 阅读(278) 评论(0) 推荐(0)
摘要: 1 ''' 2 新增功能: 3 1.完善音效类 4 2.添加开场音效 5 3.我方坦克发射子弹添加音效 6 ''' 7 #导入pygame模块 8 import pygame,time,random 9 from pygame.sprite import Sprite 10 11 SCREEN_WI 阅读全文
posted @ 2019-11-11 10:57 LLLN 阅读(278) 评论(0) 推荐(0)
摘要: 我的博客园css模板美化的经验分享 作为一个搞CS的人,如果你只是想找个地方发博客,那么博客园还是个不错的平台。虽然现在的自建博客工具多的不得了,动态的有WordPress、Ghost,静态的有hexo、jekyll等等;虽然对于一个码农而言捣鼓这些东西也算不上太难,不过终归是要浪费时间的。所以本着 阅读全文
posted @ 2019-11-11 00:07 LLLN 阅读(387) 评论(0) 推荐(0)
摘要: 1 #!/usr/bin/env python 2 # coding=utf-8 3 import pygame 4 import sys 5 import random 6 7 # 全局定义,screen的长和宽 8 SCREEN_X = 600 9 SCREEN_Y = 600 10 11 12 阅读全文
posted @ 2019-11-09 10:46 LLLN 阅读(367) 评论(0) 推荐(0)
摘要: 1 #!/usr/bin/env python 2 # coding: utf-8 3 4 import pygame 5 import time 6 import random 7 from pygame.locals import * 8 9 10 class Base(object): 11 阅读全文
posted @ 2019-11-09 10:42 LLLN 阅读(292) 评论(0) 推荐(0)
摘要: PyInstaller库的安装 (cmd命令行) pip install pyinstaller 参数描述 -h 查看帮助 --clean 清理打包过程中的临时文件 -D, --onedir 默认值,生成dist文件夹 -F, --onefile 在dist文件夹中只生成独立的打包文件 -i <图标 阅读全文
posted @ 2019-11-08 18:10 LLLN 阅读(175) 评论(0) 推荐(0)
摘要: # PythonDraw.py import turtle as t t.setup(650, 350, 200, 200) t.penup() t.fd(-250) t.pendown() t.pensize(25) t.pencolor("purple") t.seth(-40) for i i 阅读全文
posted @ 2019-10-09 17:06 LLLN 阅读(166) 评论(0) 推荐(0)
Copyright © 2021 llln Powered by .NET 5.0 on Kubernetes