35 lines
560 B
Plaintext
35 lines
560 B
Plaintext
Übergangstruktur
|
|
|
|
next()
|
|
{
|
|
calculate best next move out of information in log
|
|
solve(with m and n or a puzzlepiece from box)
|
|
}
|
|
|
|
solve()
|
|
{
|
|
solve algorithm
|
|
|
|
if(no solution) backtrack!
|
|
if(multiple solutions) set multiple solutions into log...setsolution();
|
|
if(one solution) set solution into log...setsolution();
|
|
|
|
return{no solution, multiple solutions, one solution}
|
|
|
|
}
|
|
|
|
setsolution()
|
|
{
|
|
set pointer(s) in log
|
|
set pointer to log into matrix
|
|
}
|
|
|
|
backtrack()
|
|
{
|
|
go into log, remove last piece
|
|
|
|
goes back to next()
|
|
}
|
|
|
|
|