Knight's tour: Difference between revisions
→{{header|m4}}
Line 8,551:
dnl Extract the nth position from the path.
define(`path_nth',`substr($1,eval(( $2 ) * 2),2)')
define(`
dnl Is the position $1 contained in the path $2?
Line 8,612 ⟶ 8,611:
`pushdef(`moves',next_moves($2))`'dnl
ifelse(moves,`',`find_tour($1)',
`find_tour($1,$2`'
popdef(`moves')')')
|