Comments (3)
最早我的设计跟你一样的,后来我实际玩了下2048的游戏,这种情况原始的游戏算法是不会叠加合并的,于是我的逻辑算法就改了,合并过的格子会做一个标记,有标记的数字不会叠加。
from python-2048.
哦,我明白你说的意思了,这里应该是逻辑的BUG。我以为你说的是:
0 0 0 2
0 0 0 2
0 0 0 2
0 0 0 2
这种情况在原始游戏中会被合并成:
0 0 0 4
0 0 0 4
0 0 0 0
0 0 0 0
当时为了做这个逻辑加了个mergedList,看来这里判断有BUG,抽时间重新设计下这里的算法吧,毕竟是三年前自己刚学python的代码,有些逻辑想不太清楚了,欢迎递交pull request。
from python-2048.
Merged, thanks.
from python-2048.
Related Issues (2)
- English Readme needed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-2048.