Monday, 26 September 2011

Tile game

Here the classic tile game, mad with just 8 lines of code:
Here the code:

view center-face gui: layout [
origin 0x0 space 0x0 across
style p button 60x60 [
if not find [0x60 or 60x0 0x-60 -60x0] face/offset - empty/offset [exit]
temp: face/offset face/offset: empty/offset empty/offset: temp
]
p "1" p "2" p "3" p "4" return p "5" p "6" p "7" p "8" return
p "9" p "10" p "11" p "12" return p "13" p "14" p "15"
empty: p 200.200.200 edge [size: 0]
]

Made by Nick Antonaccio, original ource:  http://www.rebol.net/demos/BCE14446FF2CEF11/tiniest_tile_game.r

Monday, 5 September 2011