15 puzzle game: Difference between revisions

Content added Content deleted
Line 4,623: Line 4,623:
rem written in Craft Basic
rem written in Craft Basic
rem by Gemino Smothers 2023
rem by Gemino Smothers 2023
rem www.basicgames.xyz
rem www.lucidapogee.com


define size = 16, correct = 0, moves = 0
define size = 16, correct = 0, moves = 0
Line 4,639: Line 4,639:
title "15 Puzzle"
title "15 Puzzle"


resize 0, 0, 170, 250
resize 0, 0, 170, 270
center
center


Line 4,739: Line 4,739:
for f = 0 to size - 1
for f = 0 to size - 1


let n = ( int: (rnd) * 14 ) + 1
let n = int(rnd * 15) + 1
let s = 0
let s = 0


Line 4,781: Line 4,781:
do
do


let click = (forms)
let click = forms


if click > 0 and click < 17 and start = 1 then
if click > 0 and click < 17 and start = 1 then