使用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
Meu primeiro jogo desenvolvido em Python, usado o módulo do Pygame

📖 Sobre Esse repositório é dedicado ao meu primeiro jogo feito em Python, utilizando o módulo do pygame. O jogo foi desenvolvido seguindo o tutorial

Michael Douglas 0 May 06, 2022
Software Design | Spring 2020 | Classic Arcade Game

Breakout Software Design Final Project, Spring 2020 Team members: Izumi, Lilo For our Interactive Visualization, we implemented the classic arcade gam

Lilo Heinrich 1 Jul 26, 2022
This is the card game like HearthStone and Magic

Territory War How to use it use pip3 to install django and channels: pip3 install Django pip3 install channels go to CardGame/first/consumers.py and g

Caesar 3 Oct 24, 2022
A menu for pygame. Simple, and easy to use

pygame-menu Source repo on GitHub, and run it on Repl.it Introduction Pygame-menu is a python-pygame library for creating menus and GUIs. It supports

Pablo Pizarro R. 411 Dec 27, 2022
PyCharge is an open-source computational electrodynamics Python simulator

PyCharge PyCharge is an open-source computational electrodynamics Python simulator that can calculate the electromagnetic fields and potentials genera

Matthew Filipovich 28 Jan 03, 2023
Memory game in Python

Concentration - Memory Game Concentration is a memory game written in Python, inspired by memory-game. Description As stated in the introduction of th

Marco Colonna 0 Jul 21, 2022
A solution program of 24. game.

A solution program of 24. game.

1 Dec 12, 2022
Brawl Stars open source server for v20

Laser Scratch Brawl Stars open source server for v20! Implemented Features Battle End Leaderboard Player Profile Lobby Info Menu Notifications Club Wa

TheIke 17 Nov 19, 2022
An asynchronous Minecraft server wrapper written in python3 with asyncio

mark3 (WIP) A modern Minecraft server wrapper written in python3 with asyncio TODO Note: The order of the following checklist doesn't necessarily mean

Colin Andress 7 Jul 29, 2022
Basic Python physics library.

pythonPhysics Basic Python physics library. Must have pygame installed. How to: Sketon program is included. for p in env.particles: pygame.draw.circle

1 Jan 16, 2022
Email guesser - Guessing BF email based on emailGuesser by WhiteHatInspector

email_guesser Guessing BF email based on emailGuesser by WhiteHatInspector (http

4 Dec 25, 2022
Solo CLF project about the creation of the FlickColor game in Python with very precise instructions.

Solo CLF project about the creation of the FlickColor game in Python with very precise instructions.

COZAX 1 Dec 09, 2022
SelectionSortVisualization - This pygame project is helping you to understand the selection sorting algorithm

SelectionSortVisualization (If you have any comments or suggestion, please conta

Berkay IPEK 3 Feb 17, 2022
It just a cli based snake game written in Python.

Snake Game in Python Things that I learned in this project: OOP in Python. Clean code. The curses library. How to run the game You need to clone this

Kevin Marques 7 Oct 01, 2022
Algorithm to solve Wordle correctly 100% of the time within 6 attempts.

WordleSolver © Zulkarnine, 2022. Algorithm to solve Wordle 100% of the time within 6 attempts. You can go ahead and run main.py to run it for all 2315

Zulkarnine Mahmud 69 Dec 11, 2022
Jogo da velha escrito em python para 1 ou 2 jogadores

O Jogo da Velha Esse jogo da velha foi desenvolvido por mim em python, como um desafio de programar um jogo da velha em menos de 24 horas, no qual o c

Gabriel Castelo Branco 5 Jun 18, 2021
Netskrafl - an Icelandic crossword game website

Netskrafl - an Icelandic crossword game website English summary This repository contains the implementation of an Icelandic crossword game in the genr

Miðeind ehf 30 May 09, 2022
用于 blivechat 的图形界面

blivechat GUI 用于 blivechat 的图形界面。 有朋友在搞 Vtuber,像 blivechat 类似的项目能通过自定义 CSS 的方式在 OBS 上添加一个非常好看的聊天栏。但是想要在桌面端看到弹幕的话得要再开一个浏览器页面,十分不方便。就想写一个背景透明的浮窗浏览器。 挺喜欢

Silence 11 Dec 29, 2022
Arcade-like space shooter game written entirely in python

E.T.-Attack Arcade-like space shooter game written entirely in python Project description A space shooter game - inspired by the legendary game Space

Sven Eschlbeck 2 Dec 17, 2022
Quantum version of the game Tic Tac Toe.

QTicTacToe Quantum version of the game Tic Tac Toe. This game was inspired by the game at this site. Installation The game requires the qiskit python

1 Jan 05, 2022