Knights Class Reference
[Example scripts (models)]
Inherits Example.
Detailed Description
Example: n-Knights tourFill an n times n chess board with knights such that the knights do a full tour by knights move (last knight reaches first knight again). The formulation is due to Gert Smolka.
Definition at line 35 of file knights.cc.
Public Member Functions | |
| int | field (int i, int j) |
| Return field at position i, j. | |
| Knights (const Options &opt) | |
| The actual model. | |
| Knights (bool share, Knights &s) | |
| Constructor for cloning s. | |
| virtual Space * | copy (bool share) |
| Copy during cloning. | |
| virtual void | print (void) |
| Print board. | |
Constructor & Destructor Documentation
| Knights::Knights | ( | const Options & | opt | ) | [inline] |
| Knights::Knights | ( | bool | share, | |
| Knights & | s | |||
| ) | [inline] |
Member Function Documentation
| int Knights::field | ( | int | i, | |
| int | j | |||
| ) | [inline] |
| virtual Space* Knights::copy | ( | bool | share | ) | [inline, virtual] |
| virtual void Knights::print | ( | void | ) | [inline, virtual] |
The documentation for this class was generated from the following file:
- examples/knights.cc (Revision: 3517)
