16 puzzle game: Difference between revisions

m
(julia example)
Line 533:
 
inorder = string.(reshape(1:bsize*bsize, bsize, bsize))
shufflepuzzle(puzz)puzzle = shuffle(puzzinorder)
puzzle = shufflepuzzle(inorder)
rotatecol(puzzle, col, n) = puzzle[:, col] .= circshift(puzzle[:, col], n)
rotaterow(puzzle, row, n) = puzzle[row, :] .= circshift(puzzle[row, :], n)
Line 609 ⟶ 608:
 
function initialize!(w)
puzzle = shufflepuzzleshuffle(inorder)
won = false
update!()
Line 626 ⟶ 625:
puzzle16app(4)
</lang>
 
 
=={{header|Phix}}==
4,102

edits