15 puzzle game: Difference between revisions

Content added Content deleted
Line 5,197: Line 5,197:
[https://easylang.online/apps/15-puzzle.html Run it]
[https://easylang.online/apps/15-puzzle.html Run it]


<syntaxhighlight lang="text">sys topleft
<syntaxhighlight lang="text">
sys topleft
background 432
background 432
textsize 13
textsize 13
len f[] 16
len f[] 16
func draw . .
proc draw . .
clear
clear
for i = 1 to 16
for i = 1 to 16
Line 5,221: Line 5,222:
.
.
global done .
global done .
func init . .
proc init . .
done = 0
done = 0
for i = 1 to 16
for i = 1 to 16
Line 5,246: Line 5,247:
call draw
call draw
.
.
func move_tile . .
proc move_tile . .
c = mouse_x div 25
c = mouse_x div 25
r = mouse_y div 25
r = mouse_y div 25
Line 5,279: Line 5,280:
.
.
.
.
call init</syntaxhighlight>
call init
</syntaxhighlight>


=={{header|F_Sharp|F#}}==
=={{header|F_Sharp|F#}}==