+
Point of view
All features
class KNIGHT
Summary
The classic KNIGHT problem on a N times N square chessboard. The knight have to pass on all places of the chessboard once a time. For instance, here is solution for a 7 X 7 chessboard, knight starting at position <1,1>:
```           1   28   37   24    3   26   17
36   39    2   27   18   11    4
29   42   23   38   25   16    9
40   35   30   19   10    5   12
43   22   41   32   15    8   47
34   31   20   45   48   13    6
21   44   33   14    7   46   49
```
Direct parents
Insert list: ARGUMENTS
Overview
Creation features
{ANY}
Features
{}
{ANY}
{ANY}
{}
Implementation of ARGUMENTS (do not use directly):
{}
make
effective procedure
{}
chess_minimum: INTEGER_32
is 3
constant attribute
{}
chess_maximum: INTEGER_32
is 24
constant attribute
{}
chessboard: ARRAY2[INTEGER_32]
writable attribute
{}
nb_tries: INTEGER_32
writable attribute
{}
line_move: FAST_ARRAY[INTEGER_32]
once function
{}
column_move: FAST_ARRAY[INTEGER_32]
once function
{}
knight (size: INTEGER_32, line: INTEGER_32, column: INTEGER_32)
effective procedure
{}
solution (line: INTEGER_32, column: INTEGER_32): BOOLEAN
effective function
{}
try (line: INTEGER_32, column: INTEGER_32, value: INTEGER_32): BOOLEAN
effective function
{}
Try to place the knight by used cross back-tracking method.
ask (s: STRING, min: INTEGER_32, max: INTEGER_32): INTEGER_32
effective function
{}
Ask for question s until the answer is in range min max.
print_on (file: OUTPUT_STREAM)
effective procedure
{ANY}
Display the chessboard.
argument_count: INTEGER_32
effective function
{ANY}
Number of arguments given to command that started system execution (command name does not count).
argument (i: INTEGER_32): STRING
effective function
{ANY}
i th argument of command that started system execution Gives the command name if i is 0.
command_name: STRING
effective function
{ANY}
command_arguments: FAST_ARRAY[STRING]
frozen
once function
{}
Give access to arguments command line including the command name at index 0.
se_argc: INTEGER_32
{}
To implement command_arguments
se_argv (i: INTEGER_32): STRING
{}
To implement command_arguments