16 puzzle game: Difference between revisions
→{{header|FutureBasic}}
Line 203:
str63 board, startPos, winBoard
void local fn
window 1,,(0,0,340,340)
int x
Line 220:
button _restrt,,,@"Redo", (270,270,50,50),,NSBezelStyleTexturedSquare
button _help ,,,@"Help", (270, 20,50,50),,NSBezelStyleTexturedSquare
▲ for r = 1 to 16
▲ winBoard += chr$(r)
next
board = winBoard
end fn
Line 245 ⟶ 240:
void local fn move( tag as int )
int r,
select tag / 10
case _up :
case _right :
case _down :
case
end select
for r =
swap board[r], board[r+
next
if board == winBoard then window 1, @"!!! YOU WON !!!" : text,,fn colorRed
|