Create a simple 2048 game clone
GolfScript, 323 characters
1,16*{16,{1$=!},.,rand=)/()2++\[]*+4/{.['-----']4*'+'*'++'1/*n+:^\{'|''     ':X'|'+4*n++:Y.@{X\`+-5&gt;'|'\+}%'|'+n+Y+Y+^+}%+puts}:P~&quot;wasd&quot;:Q{1$.@{Q\?[{zip}{}{-1%zip-1%}{{-1%}%}]=\1$~{0-[{.2$={+)}*}*0...]4&lt;{1|(}%}%\~}:^~=!},:F{0{;'&quot;#{'9.?rand';STDIN.getc()}&quot;'++~.F\?0&lt;}do^[]*.2048?0&lt;.!{'you win'@@}*}{'you lose'@@*0}if}do 4/P;

The keys you have to use are wasd but you can change the constant in the code to whatever keys you like. It gracefully ignores any unknown key or illegal move. Unfortunately you have to press enter after each key.

256 character solution
1,16*{16,{1$=!},.,rand=)/())+\[]*+4/{.{{.9&gt;7*+48+}%n+}%puts}:P~&quot;wasd&quot;:Q{1$.@{Q\?[{zip}{}{-1%zip-1%}{{-1%}%}]=\1$~{0-[{.2$={;21+}*}*0...]4&lt;{20%}%}%\~}:^~=!},:F{0{;'&quot;#{'9.?rand';STDIN.getc()}&quot;'++~.F\?0&lt;}do^[]*.10?0&lt;.!{'you win'@@}*}{'you lose'@@*0}if}do 4/P;

Here the output is hexadecimal logarithmic, i.e. 0 stands for ., 1 for 2, 2 for 4, 3 for 8 ... B for 2048. Since we all know hexadecimals and the powers of two this shouldn't be a limitation at all.
Example run (first moves):
0000
0000
0010
0000
w
0011
0000
0000
0000
a
2000
0000
0001
0000
s
0000
0000
0100
2001
d
0000
0000
1001
0021
w
1022
0000
0001
0000
a
1301
0000
1000
0000
s
0000
1000
0000
2301
d
0000
1001
0000
0231