使用python编写2048游戏及自动玩

Overview

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
Owner
tiger-wang
tiger-wang
Mandaw 2 Mar 01, 2022
My goofy little script for playing wordle

my wordle "solver" My goofy little script for playing wordle. It actually runs really slowly at first but once you've added some info (e.g. which lett

MB 3 Feb 04, 2022
A simple matrix code rain created using Python with Pygame.

Matrix4_code_rain A simple matrix code rain created using Python with Pygame. To run the code you will need Pygame and MS Mincho font. Create a projec

7 Nov 06, 2022
Orbital-patterns - A program which plots pattern that revolving planets make

orbital-patterns Click to spawn planets Press "S" to capture screenshot. Image w

Yuvraj.M 11 Dec 24, 2022
Wordle Solver: A simple script which is also called Wordle solver

wordle-solver this code is a simple script which is also called Wordle solver. t

amirreza 1 Feb 15, 2022
Made by Ashish and Avinash-sord12k. Powered by pygame

Spook_alle About -Made by Ashish (Github: Ashish-Github193) and Avinash-sord12k Version - BETA v_1.0 /1-11-2021/ (game is at its base version more ite

Ashish Kumar Jha 1 Nov 01, 2021
Dota2 AI bot - Last Order Dota2 Solo AI

Last Order Dota2 Solo AI 该库提供一个由强化学习训练出的Dota2影魔solo智能体。该智能体通过自我对战的训练方式训练,从随机动作开始学习复杂的策略。玩家可以与该智能体进行影魔solo对战。 对战规则 1.物品方面不可以出凝魂之露,灵魂之戒,魔瓶,真眼。 2.不可以吃符,或

bilibili 365 Jan 05, 2023
Minecraft.nix - Command line Minecraft launcher managed by nix

minecraft.nix Inspired by this thread, this flake contains derivations of both v

12 Sep 06, 2022
A converter for the .BMR / .RLE bitmap files used in some Neversoft PS1 games.

Requirements python3 pyqt5 - can be installed with pip install PyQt5 pypng - Included Usage Instructions This program can be running py main.py in the

4 Jul 30, 2022
Quiz Game: answering questions naturally with a friendly UI to enjoy the game

About Quiz Game : The Game is about answering questions naturally with a friendl

4 Jan 19, 2022
Cricket game using PYQT

Cricket-game-using-PYQT This is a Fantasy cricket Desktop application build in p

Sanket Mane 1 Jan 03, 2022
You can play TicTacToe with the engine running UI.py with python3

TicTacToe An "Engine" for TicTacToe You can play TicTacToe with the engine running UI.py with python3. The file engine.py is designed so you can make

Ahnaf Syndeed 3 Feb 20, 2022
Python game engine for 2D multiplayer online games.

LAN-Caster The goal of LAN-Caster is to provide an easy-to-use code base (game engine) for developing 2D multiplayer online games. LAN-Caster original

Douglas Bakewell 1 Feb 11, 2022
View your VALORANT performance in different areas of every map in the game!

Valorant-Zone-Stats Inspired by Leetify's awesome Map Zones Tool for CS:GO A simple desktop program to view your VALORANT performance in different are

Louis 76 Jan 01, 2023
Online battleships game on python and JS

Battleships Online battleships game Using websockets to connect to the client. SQLite database for storing account data and game logs (for players top

5 Nov 11, 2021
uses Entropy to find the best next guess for Wordle, given the color clues

WordleSolver uses Entropy to find the best next guess for Wordle, given the color clues use player.py and enter in the string for the suggested clue w

Steve Earth 1 Jan 26, 2022
Inflitator is a classic doom and wolfenstein3D like game made in Python, using the famous PYGAME module.

INFLITATOR Raycaster INFLITATOR is a raycaster made in Python3 with Pygame. It is a game built on top of a simple engine of the same name. An example

Zanvok Corporation 1 Jan 07, 2022
Repository with console python implementation of Simple Artificial Life (simplified MAS) and Conway's game of life

artificial-life-game Repository with console python implementation of Simple Artificial Life (simplified MAS) and Conway's game of life Installation c

Vladislav 6 Nov 14, 2022
Useful guides, tutorials, and FAQs related to LEGO Universe and Darkflame Universe.

Awesome Lego Universe A curated list of awesome things related to LEGO Universe. LEGO Universe was a kid-friendly massively-multiplayer online role pl

Eric Myllyoja 33 Dec 12, 2022
Web frontend to play games from 2008 Miniclip - uses Ruffle for playback

cliparchive Description A set of scripts to download games from the Wayback Machine's archive of Miniclip.com, and a Web frontend to play them using r

Simon Garrelou 3 Dec 09, 2022