2048: Difference between revisions

Content added Content deleted
Line 3,893: Line 3,893:
Def Tile$(x)=If$(x=0->"[ ]", format$("[{0::-4}]", x))
Def Tile$(x)=If$(x=0->"[ ]", format$("[{0::-4}]", x))
\\ empty board
\\ empty board
BoardTileRight =lambda (x, y)->x+y*4
BoardTileRight=lambda (x, y)->x+y*4
BoardTileLeft=lambda (x, y)->3-x+y*4
BoardTileLeft=lambda (x, y)->3-x+y*4
BoardTileUp=lambda (x, y)->x*4+y
BoardTileUp=lambda (x, y)->x*4+y
Line 3,943: Line 3,943:
End
End
Sub Process(Boardtile)
Sub Process(Boardtile)
Inventory EmptyTiles
Inventory EmptyTiles ' clear inventory
local what, i, j, k
local where, i, j, k
For i=0 to 3
For i=0 to 3
Gravity()
Gravity()