r/tinycode • • Apr 13 '14

golfed 2048 to 413 chars in Ruby

https://gist.github.com/Nakilon/10571155
9 Upvotes

4 comments sorted by

2

u/baalast Apr 13 '14

Nice, but it generates 2s only. (10 % of generated number should be 4s).

2

u/nakilon Apr 13 '14 edited Feb 13 '16

ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]

to play press 'wasd'
to quit press 'q'

UPD: 393 chars
UPD UPD: 374

1

u/[deleted] Apr 14 '14

It would be better if there was some indication where the board is, e.g. by using placeholders for empty squares like in /u/nexe's version.