2048GameAutoMovePython
使用python编写2048游戏及自动玩
Install / Use
/learn @VacantHusky/2048GameAutoMovePythonREADME
2048GameAutoMovePython
使用python3编写2048游戏及自动玩2048
演示视频:https://www.bilibili.com/video/BV1zg411u7tH/
使用pygame模块绘制游戏界面。
一、2048python
2048python目录里是纯python写的。 启动方式:
cd ./2048python
python3 main.py
二、2048python&c
2048python&c目录里是将2048策略算法使用c语言重写,然后编译成so文件,以提高运行速度。
1.编译so文件
项目中的2048.so文件是在我电脑上编译的,如果你的电脑是64位,安装的python也是64位的,且cpu什么的和我差不多,那么可以直接使用我编译的so文件。
需要安装gcc,并且得看你的python是32位还是64位,gcc也得是相应的位数。
编译:
# 进入目录
cd "./2048python&c"
gcc 2048ai.c -shared -o ./2048.so
2.运行
python3 main.py
Related Skills
node-connect
354.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
112.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
354.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
354.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
