15 puzzle game: Difference between revisions

Line 5,198:
 
<syntaxhighlight lang="text">
# 15 Puzzle
#
sys topleft
background 432
Line 5,224 ⟶ 5,222:
.
global done .
proc smiley . .
dones = 13.5
x = 86
y = 86
move 10x 30y
color 983
circle 2.8 * s
color 000
move x - s y - s
circle s / 3
move x + 3.5 y - 3.5
circle s / 3
linewidth s / 3
curve [ x - s y + s x y + 2 * s x + s y + s ]
.
proc init . .
done = 0
Line 5,263 ⟶ 5,276:
.
draw
done = 1
for i = 1 to 15
if f[i] > f[i + 1]
done = 0return
.
.
if done = 1
timer clear0.5
move 10 30
text "Well done!"
.
.
on mouse_down
if done = 10
move_tile
elif done = 3
init
.
.
on timer
if done = 1
smiley
done = 2
timer 2
else
move_tiledone = 3
.
.
2,056

edits