You may also be interested in checking out Threes, for iOS, from which 2048 was cloned [2]. Threes has a very cool development blog online [3] that talks about how they iterated the design and the impact cloning had on them.
Jay 1. https://itunes.apple.com/us/app/threes!/id779157948?mt=8 2. http://www.giantbomb.com/articles/meet-the-clones/1100-4891/ 3. http://asherv.com/threes/threemails/ On Sun, Apr 20, 2014 at 5:38 PM, Daniel Prager <daniel.a.pra...@gmail.com> wrote: > I've re-implemented the simple, popular, addictive (be warned!), open source > puzzle game 2048 in a single file of Racket: > > https://github.com/danprager/racket-2048 > > It's a clean-room, functional implementation, with I hope reasonable > comments. The commented code is just over 500 lines, plus tests. > > One of the nice things about the original 2048 is how many creative > variations have been devised: 3D and 4D, hexagonal grid, AI, Tetris version, > image-based versions, parodies (including numberwang ;-). There are even > sites where you can config your own version. My 8 year-old daughter did a > version based on "there was an old lady who swallowed a fly". > > Code review and suggestions appreciated, or just fork and hack away. > > Ideas for improving the existing code: > * In-game instructions > * Suggestions on using parameters instead of global *constants* > * Sprites instead of first-principles animation > * Better factoring out of the model and views of the board > * Caching > * Types > > But I suspect the real fun is in making game variants. > > Notes: > * For less time playing the game try a grid *side* of 3. > * Hold down the space bar (which just rotates the board) for an animated > effect. > * If you find the game too hard, try watching the AI version for some sense > of strategy. > > Let me know what you think! > > Dan > > -- > Daniel Prager > Agile/Lean Coaching, Software Development and Leadership > Startup: www.youpatch.com > Twitter: @agilejitsu > Blog: agile-jitsu.blogspot.com > > ____________________ > Racket Users list: > http://lists.racket-lang.org/users > -- Jay McCarthy <j...@cs.byu.edu> Assistant Professor / Brigham Young University http://faculty.cs.byu.edu/~jay "The glory of God is Intelligence" - D&C 93 ____________________ Racket Users list: http://lists.racket-lang.org/users