61

40+ 行 JS 代码打造你的 2048 游戏 AI

 6 years ago
source link: https://juejin.im/post/5a574b1f51882573450171a9
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
2048 游戏是什么? 2048 游戏如下图所示,它由一个 4*4 共 16 个方块组成。玩家可以通过「上下左右」四个方向操纵方块滑动,滑动时两个相邻且数值相同的方块会合并,新的方块,数值为两者之和。当游戏里任意方块的数值达到 2048,即为胜利。 我们将使

Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK