4
\$\begingroup\$

It was not difficult to mix the cards and make them in solitaire format.

But sometimes there are games that can't be solved. (For example in 3 turn mode)

How can I make sure that the game can be solved?

\$\endgroup\$
0

1 Answer 1

10
\$\begingroup\$

Backtracking.

Start with a solved game. Then perform random valid moves in reverse until the game is in the initial state.

This usually works with any puzzle game.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .