知行编程网知行编程网  2022-05-05 08:00 知行编程网 隐藏边栏 |   抢沙发  6 
文章评分 0 次,平均分 0.0

大家好,今天是儿童节,虽然已经是大龄程序员了,但是童心还是一直都在的。今天就分享一个私藏的GitHub项目——free-python-games,一行代码就能进入使用Python开发的小游戏快乐玩耍!


安装与使用


安装当然也很简单一行代码就可以
python3 -m freegames copy snake

执行之后桌面就多了一个snake.py,打开就能查看游戏对应的逻辑

童年的游戏,Python一行代码就能玩

现在我们就可以学习源码并进行修改来实现更多的功能与玩法,抓紧试试吧!


<section><section data-mpa-template="t"><section style="font-size: 16px;white-space: normal;font-family: -apple-system-font, system-ui, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;letter-spacing: 0.544px;color: rgb(0, 0, 0);text-align: left;"><span style="font-size: 15px;color: rgb(255, 41, 65);"><strong>往期热门:</strong></span></section><ul class="list-paddingleft-2" style="width: 577.422px;font-size: 16px;white-space: normal;"><li style="font-size: 15px;"><section style="line-height: 2em;">十行代码,用Python做一个迷你版的美图秀秀<br  /></section></li><li style="font-size: 15px;"><section style="line-height: 2em;">实战:Flask + Vue 生成漂亮的词云<br  /></section></li><li style="font-size: 15px;"><section style="line-height: 2em;">Python和Go都很火,我要怎么选?</section></li><li style="font-size: 15px;"><section style="line-height: 2em;">漫画,假装自己是Python高手,学会这十招就可以<br  /></section></li><li style="font-size: 15px;"><section style="line-height: 2em;"><span style="color: var(--weui-LINK);text-decoration: underline;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);cursor: pointer;">看了范伟和葛大爷的电影,我决定用Python做个石头剪刀布</span></section></li><li style="font-size: 15px;"><section style="line-height: 2em;"><span style="color: var(--weui-LINK);text-decoration: underline;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);cursor: pointer;">卧槽!一行Python代码写的游戏,我能这样玩一天!</span></section></li><li style="font-size: 15px;"><section style="line-height: 2em;"><span style="color: var(--weui-LINK);text-decoration: underline;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);cursor: pointer;">80行代码!用Python做一个哆来A梦分身</span></section></li><li style="font-size: 15px;"><section style="line-height: 2em;"><span style="color: var(--weui-LINK);text-decoration: underline;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);cursor: pointer;">值得收藏!8大技巧,带你了解菜鸟和高手的区别!</span></section></li></ul><section style="font-size: 16px;white-space: normal;line-height: 2em;"><br  /></section><section powered-by="xiumi.us" style="font-size: 16px;white-space: normal;"><section><section><pre style="font-size: inherit;color: inherit;line-height: inherit;"><section data-tools="135编辑器" data-id="94250" style="letter-spacing: 0.544px;white-space: normal;border-width: 0px;border-style: none;border-color: initial;"><section data-tools="135编辑器" data-id="91842" style="border-width: 0px;border-style: none;border-color: initial;"><section style="text-align: right;width: auto;"><section style="display: inline-block;clear: both;"><section data-brushtype="text" style="padding: 18px 15px 20px 10px;color: rgb(86, 146, 214);text-align: center;letter-spacing: 1.5px;background-image: url('https://www.zkxjob.com/wp-content/uploads/2022/05/wxsync-2022-05-a2a8a5e1e58f30392066a170034ee027.png');background-size: 100% 100%;background-repeat: no-repeat;"><section style="display: flex;justify-content: center;align-items: center;"><section style="margin-left: 2px;word-spacing: 2px;width: 20px;"></section><section data-brushtype="text" style="word-spacing: 2px;font-size: 14px;color: rgb(51, 51, 51);"><span style="font-family: 楷体, 楷体_GB2312, SimKai;">点个[在看],是对菜鸟哥最大的支持!</span></section></section></section></section></section></section></section>


本篇文章来源于: 菜鸟学Python

本文为原创文章,版权归所有,欢迎分享本文,转载请保留出处!

知行编程网
知行编程网 关注:1    粉丝:1
这个人很懒,什么都没写

你可能也喜欢

热评文章

发表评论

表情 格式 链接 私密 签到
扫一扫二维码分享