so it should scramble the puzzle around right?
movePuzzle is the part where user can swap the order around (but the scrambling should be done in initPuzzle)
Hmm, but looking closely at initPuzzle(), it clearly achieves the scrambling by calling movePuzzle(...) on two occasions.
// scramble the puzzle
for (y=0; y<=ROWS*COLS; y++) {
if ((rand() % 2) == 0) {
movePuzzle(puzzle, 'v', rand() % COLS);
}
else {
movePuzzle(puzzle, 'h', rand() % ROWS);
}
}
So, this means that you have to write the code for movePuzzle(...) in order to have the puzzle scrambled. Once you have movePuzzle() coded, you can call it from the main() too (passing in the user's input).