#include <Strategy.h>
Inheritance diagram for Strategy:

This is an abstract class meant to be extended by overriding the setStartCell function. The solve function is implemented, but may also be overridden if a more efficient method can be found.
Public Member Functions | |
| Strategy (const Puzzle &p) | |
| Creates this Strategy for use on the given Puzzle. | |
| virtual | ~Strategy () |
| Destructor. | |
| virtual void | setStartCell (size_t &x, size_t &y)=0 |
| Sets the coordinates of the starting point of this Strategy's solution. | |
| virtual bool | solve () |
| Recursively solves the Puzzle for which this Strategy was created. | |
| void | printPuzzle () |
| Prints this Strategy's puzzle. | |
Public Attributes | |
| size_t | calls |
Protected Attributes | |
| Puzzle * | p |
| The Puzzle to be solved using this Strategy. | |
| size_t | depth |
| Indexes the recursion depth of a given call to this SimpleStrategy's solve function. | |
Private Member Functions | |
| Strategy () | |
| Default constructor. | |
| Strategy (const Strategy &s) | |
| Copy constructor. | |
| Strategy & | operator= (const Strategy &s) |
| Assignment operator. | |
|
|
Default constructor. Not implemented. |
|
|
Copy constructor. Not implemented. |
|
|
Assignment operator. Not implemented. |
|
|
Recursively solves the Puzzle for which this Strategy was created. Returns true if the Puzzle has been solved, false if it has no solution. |
1.3.4