[开源游戏] 2048

2016年10月09日 开源APP 暂无评论 阅读 2,883 views 次



This is a derivative and the iOS version of the game 2048. In the very unlikely case that you don't know what it is, you can check it out here.

Made just for fun!



An AI is added, thanks to DJBen! Tap "Hint" to show hint (e.g. Move left/right/up/down); tap "Auto Run" to run AI automatically. Check it out in the AI branch. You can also check out this demo video on YouTube.

Thanks to ov3y's Javascript version that gave me (DJBen, that is) inspiration.


The Game

Since it is a derivative of the original 2048, it is not the same. More explicitly, it has the following additions:

  • Three board sizes: 3x3, 4x4 and 5x5. The smaller the board is, the fewer cells you have, and the harder the game is.*
  • Three game modes: The original Power of 2, i.e. combining two tiles of the same value to produce their sum. The Power of 3, i.e. combining three consecutive tiles of the same value to produce their sum. Not surprisingly, this is pretty hard with the 3x3 board, although I found it pretty easy to get 81. 243 is a different story... And the Fibonacci sequence, i.e. combining two adjacent numbers in the sequence 2, 3, 5, 8, 13... (I omitted the two 1's in the beginning) to produce the one next to the larger value. This is pretty tricky. Try it out and you will know what I mean.
  • Three themes: I made a bright theme and a 'joyful' theme in addition to the original one. In case you wonder how to do themes in iOS. (There may be a better way, but themes are verbose in nature, because you have to specify all the colors, fonts, etc.)






Copyright © iOSCodeHub 保留所有权利.  

用户登录 ⁄ 注册