$ diff workaround.html tour10.html
6c6
<
Knights Tour
---
> Knights Tour (10x10)
13c13
<
---
>
15c15
< Knight's Tour
---
> Knight's Tour (10x10)
21c21
<
---
>
$
$
$ diff workaround.xsl tour10.xsl
9a10,11
> 2/23/2013: changed 8x8 to 10x10 board (hsw)
>
26,27c28,29
< * A square on the chessboard: represented as a number in the range 0 to 63
< * A state of the chessboard: a sequence of 64 integers, each containing a move number.
---
> * A square on the chessboard: represented as a number in the range 0 to $N *$N -1
> * A state of the chessboard: a sequence of $N *$N integers, each containing a move number.
33c35,37
<
---
>
>
>
44c48
<
---
>
79c83
<
---
>
82c86
< for $i in 1 to 64 return
---
> for $i in 1 to $N *$N return
135c139
<
---
>
171c175
< select="tour:place-knight(99, $board, $trial-move)"/>
---
> select="tour:place-knight($N *$N +1, $board, $trial-move)"/>
211,212c215,216
<
<
---
>
>
216,231c220,235
< (if ($row > 1 and $column > 0 and $board[($square - 17) + 1]=0)
< then $square - 17 else (),
< if ($row > 1 and $column < 7 and $board[($square - 15) + 1]=0)
< then $square - 15 else (),
< if ($row > 0 and $column > 1 and $board[($square - 10) + 1]=0)
< then $square - 10 else (),
< if ($row > 0 and $column < 6 and $board[($square - 6) + 1]=0)
< then $square - 6 else (),
< if ($row < 6 and $column > 0 and $board[($square + 15) + 1]=0)
< then $square + 15 else (),
< if ($row < 6 and $column < 7 and $board[($square + 17) + 1]=0)
< then $square + 17 else (),
< if ($row < 7 and $column > 1 and $board[($square + 6) + 1]=0)
< then $square + 6 else (),
< if ($row < 7 and $column < 6 and $board[($square + 10) + 1]=0)
< then $square + 10 else () )"/>
---
> (if ($row > 1 and $column > 0 and $board[($square - 2*$N -1) + 1]=0)
> then $square - 2*$N -1 else (),
> if ($row > 1 and $column < $N -1 and $board[($square - 2*$N +1) + 1]=0)
> then $square - 2*$N +1 else (),
> if ($row > 0 and $column > 1 and $board[($square - $N -2) + 1]=0)
> then $square - $N -2 else (),
> if ($row > 0 and $column < $N -2 and $board[($square - $N +2) + 1]=0)
> then $square - $N +2 else (),
> if ($row < $N -2 and $column > 0 and $board[($square + 2*$N -1) + 1]=0)
> then $square + 2*$N -1 else (),
> if ($row < $N -2 and $column < $N -1 and $board[($square + 2*$N +1) + 1]=0)
> then $square + 2*$N +1 else (),
> if ($row < $N -1 and $column > 1 and $board[($square + $N -2) + 1]=0)
> then $square + $N -2 else (),
> if ($row < $N -1 and $column < $N -2 and $board[($square + $N +2) + 1]=0)
> then $square + $N +2 else () )"/>
244c248
<
---
>
247c251
<
---
>
249c253
<
---
>
270,271c274,275
<
<
---
>
>
274c278
<
---
>
276c280
<
---
>
$