首页 > 编程语言 >经典的Python小游戏值得收藏

经典的Python小游戏值得收藏

时间:2023-04-21 17:48:52浏览次数:30  
标签:单击 classic Python screen 收藏 -- game 小游戏 Click

最近在github上发现用Python开发的多款经典小游戏。这个必须要推荐给大家!可以针对Python2和Python3(到Python的3.7)

项目地址:

grantjenks/free-python-games​github.com/grantjenks/free-python-games

绘画板

在屏幕上画线和形状。单击以标记形状的开始,然后再次单击以标记其结束。使用键盘可以选择不同的形状和颜色。

动图封面  

Snake

Snake-- classic arcade game. Use the arrow keys to navigate and eat the green food. Each time the food is consumed, the snake grows one segment longer. Avoid eating yourself or going out of bounds!

贪吃蛇

经典的电子游戏,使用箭头导航控制蛇去吃绿色食物。每次一次食物,蛇身就长出一格。吃到自己或者出界游戏结束。

动图封面  

Pacman

Pacman -- classic arcade game. Use the arrow keys to navigate and eat all the white food. Watch out for red ghosts that roam the maze.

吃豆人

经典的电子游戏,使用箭头导航控制黄色吃豆人吃掉所有白色食物,若被红色的鬼魂抓住,游戏结束。

动图封面  

Cannon

Cannon -- projectile motion. Click the screen to fire your cannnonball. The cannonball pops blue balloons in its path. Pop all the balloons before they can cross the screen.

加农炮

点击屏幕发射炮弹。炮弹在它的路径上弹出蓝色气球。在气球穿过屏幕之前把它们全部弹出。

动图封面  

Connect

Connect -- Connect 4 game. Click a row to drop a disc. The first player to connect four discs vertically, horizontally, or diagonally wins!

四子棋

单击行可放置光盘。第一个垂直、水平或对角连接四张光盘的玩家获胜。

动图封面  

Flappy

Flappy -- Flappy-bird inspired game. Click the screen to flap your wings. Watch out for black ravens as you fly across the screen.

Flappy Bird

点击屏幕来拍打鸟的翅膀。飞过屏幕被黑色乌鸦碰到,游戏结束。

动图封面  

Memory

Memory -- puzzle game of number pairs. Click a tile to reveal a number. Match two numbers and the tiles will disappear to reveal an image.

记忆:数字对拼图游戏

单击方格用于显示数字。匹配两个数字,方格将显示从而显示图像。

动图封面  

Pong

Pong -- classic arcade game. Use the keyboard to move your paddle up and down. The first player to miss the ball loses.

乒乓

用键盘上下移动划桨,谁先丢失球,谁输!

动图封面  

Simon Says

Simon Says -- classic memory puzzle game. Click the screen to start. Watch the pattern and then click the tiles in the same order. Each time you get the sequence right the pattern gets one step longer.

西蒙说:经典的记忆拼图游戏

单击屏幕开始。观察图案,然后按相同顺序单击瓷砖。每次敲对顺序,系统就会增加一步继续开始游戏。

 

动图封面  

Tic Tac Toe

Tic Tac Toe -- classic game. Click the screen to place an X or O. Connect three in a row and you win!

井字游戏

点击屏幕放置一个X或O。连续连接三个,你就赢了!

 

动图封面  

Tiles

Tiles -- puzzle game of sliding numbers into place. Click a tile adjacent to the empty square to swap positions. Can you make the tiles count one to fifteen from left to right and bottom to top?

瓦片:将数字滑动到位的拼图游戏

单击靠近空正方形的方格以交换位置。你能把方格从左到右,从下到上数到十五吗?

动图封面  

Tron

Tron -- classic arcade game. Use the keyboard to change the direction of your Tron player. Avoid touching the line drawn by your opponent.

特龙

使用键盘更改你的线条行进方向。避免触碰对手画的线。

动图封面  

Life

Life -- Conway's Game of Life. The classic, zero-player, cellular automation created in 1970 by John Conway.

康威的生活游戏

经典,零玩家,蜂窝自动化创建于1970年约翰康威。

动图封面  

Maze

Maze -- move from one side to another. Inspired by A Universe in One Line of Code with 10 PRINT. Tap the screen to trace a path from one side to another.

迷宫

从一边移到另一边。灵感来源于一行代码中的一个宇宙与10个打印。轻触屏幕可跟踪从一侧到另一侧的路径。

动图封面  

Fidget

Fidget -- fidget spinner inspired animation. Click the screen to accelerate the fidget spinner.

坐立不安

单击屏幕以加速。

动图封面  

你喜欢哪一款呢?赶快抓紧时间动起手来找回童年回忆!

标签:单击,classic,Python,screen,收藏,--,game,小游戏,Click
From: https://www.cnblogs.com/qian-fen/p/17341211.html

相关文章

  • python调用imgkit将html转图片pdf问题实例wkhtmltox
    wkhtmltox的下载地址:https://wkhtmltopdf.org/downloads.html或者:https://github.com/wkhtmltopdf/wkhtmltopdf0.12.6版本按网络上的教程会出现一个错误:IOError:wkhtmltopdfexitedwithnon-zerocode1.error:[blank]解决方法参见:https://stackoverflow.com/questions/......
  • Python用哈希算法查找相似图片(包括不同分辨率,不同大小,不同格式的图片)
    #-*-coding:utf-8-*-'''Python用哈希算法查找相似图片并放入[_df]的文件夹中相似图片包括不同分辨率,不同大小,不同格式,只要图片相似就会算重复文件安装cv2pipinstallopencv-python'''importosimportcv2importnumpyasnpimportshutilimportrandomclas......
  • 【四二学堂】Python数据可视化-饼形图
    #用饼形图来统计学生成绩等级占比importnumpyasnpimportpandasaspdimportmatplotlib.pyplotaspltlabel=['A','B','C','D']percent=[25,54,16,5]#explode=[0,0.2,0,0]explode=[0,0,0,0.1]plt.axes(aspect=1)plt.pie(x=percent,la......
  • 【四二学堂】python四子连珠游戏-4(落下棋子后位置记录下来。保证每个棋子能够落在准确
    代码:fromtkinterimport*importtime#画布#棋盘#鼠标左键绑定事件#落下棋子后位置记录下来。保证每个棋子能够落在准确的位置上。classGame:def__init__(self):#self.ball=ballself.clsposition=Clsposition()self.tk=Tk()......
  • 【四二学堂】Python数据可视化-线性图
    importmatplotlib.pyplotaspltimportnumpyasnpplt.rcParams['font.sans-serif']=['MicrosoftYaHei']#识别汉字x=np.linspace(0,2,50)#代表当前网线上有的点的number(0,2)代表x方向的起止位置分为50份plt.plot(x,x,label='北京')#Plotsomedat......
  • PYTHONPATH 环境变量
    在"PYTHONPATH"变量中,可以设置多个目录,目录之间用分号(;)分隔。如果没有设置"PYTHONPATH"变量,则默认为当前工作目录。将/path/to/directory添加到PYTHONPATH环境变量的末尾。#windowssetxPYTHONPATH/path/to/directory;%PYTHONPATH%#linuxexportPYTHONPATH=/pa......
  • 【汇智学堂】JAVA多线程实现的小游戏-龟兔争霸-2
    角色入场:publicvoidpaint(Graphicsg){g.clearRect(0,0,1600,900);Imageimage=newImageIcon("D:\\综合案例\\10\\src\\tu.png").getImage();//获取图片资源g.drawImage(image,PositionA-50,100,RecWidth,RecHeight......
  • 【汇智学堂】JAVA多线程实现的小游戏-弹球-2
    显示球板Ui类/**\*定义界面*显示球板*/packagecom.huizhi;importjavax.swing.*;importjava.awt.*;publicclassUiextendsJFrame{staticintPositionA=50,RecWidth=50,RecHeight=20;publicUi(){setTitle("弹球游戏");......
  • 【Python】pandas 删除空值数据 dropna
    dropnaimportpandasaspdimportnumpyasnpdf=pd.DataFrame({"name":['Alfred','Batman','Catwoman'],"toy":[np.nan,'Batmobile','Bullwhip'],"......
  • 最近在研究Python如何操作手机,使用adb
    背景:我如果能写一个自动化刷战令的功能,我是不是就可以解放双手了。#工具:adb#下面是翻译的键盘事件代表的含义keycodeconstant:未知键码。*/publicstaticfinalintKEYCODE_UNKNOWN=0;/**键码常数:软左键。*通常位于手机显示屏下方,用作多功能显示屏*功能键用于选择......