#include <solution_holder.h>
Static Public Methods | |
void | load () |
void | save () |
int | getIndexForMap (CompressedMap const &map) |
bool | hasSolution (CompressedMap const &map) |
bool | hasSolution (int index) |
int | numberOfSolutions (CompressedMap const &map) |
int | numberOfSolutions (int index) |
Movements const & | movements (CompressedMap const &map, int solution) |
Movements const & | movements (int index, int solution) |
int | pushesInSolution (CompressedMap const &map, int solution) |
int | pushesInSolution (int index, int solution) |
int | linearPushesInSolution (CompressedMap const &map, int solution) |
int | linearPushesInSolution (int index, int solution) |
int | gemChangesInSolution (CompressedMap const &map, int solution) |
int | gemChangesInSolution (int index, int solution) |
int | movesInSolution (CompressedMap const &map, int solution) |
int | movesInSolution (int index, int solution) |
QDateTime const & | dateOfSolution (CompressedMap const &map, int solution) |
QDateTime const & | dateOfSolution (int index, int solution) |
QString const & | infoOfSolution (CompressedMap const &map, int solution) |
QString const & | infoOfSolution (int index, int solution) |
int | addSolution (CompressedMap const &map, Movements const &moves, int number_of_pushes, int number_of_linear_pushes, int number_of_gem_changes, int number_of_moves, QString const &info) |
int | addSolution (int index, Movements const &moves, int number_of_pushes, int number_of_linear_pushes, int number_of_gem_changes, int number_of_moves, QString const &info) |
int | addSolution (CompressedMap const &map, Movements const &moves, int number_of_pushes, int number_of_linear_pushes, int number_of_gem_changes, int number_of_moves, QString const &info, QDateTime const &date_time) |
int | addSolution (int index, Movements const &moves, int number_of_pushes, int number_of_linear_pushes, int number_of_gem_changes, int number_of_moves, QString const &info, QDateTime const &date_time) |
void | changeSolutionInfo (CompressedMap const &map, int solution, QString const &info) |
void | changeSolutionInfo (int index, int solution, QString const &info) |
void | deleteSolution (CompressedMap const &map, int solution) |
void | deleteSolution (int index, int solution) |
bool | hasLastAttempt (CompressedMap const &map) |
Movements const & | lastAttempt (CompressedMap const &map) |
Movements const & | lastAttempt (int index) |
void | setLastAttempt (CompressedMap const &map, Movements const &movements) |
void | setLastAttempt (int index, Movements const &movements) |
Static Private Attributes | |
std::map< CompressedMap, int > | s_map_indices |
std::vector< std::vector< Movements > > | s_solutions |
std::vector< Movements > | s_last_attempts |
std::vector< std::vector< int > > | s_pushes |
std::vector< std::vector< int > > | s_moves |
std::vector< std::vector< int > > | s_linear_pushes |
std::vector< std::vector< int > > | s_gem_changes |
std::vector< std::vector< QDateTime > > | s_dates |
std::vector< QStringList > | s_infos |
bool | s_was_modified |
Note that all methods are static.
If there are more solutions for a map, the first ist the best and so on.
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Adds a new solution of a given map. Returns the position, at which the solution was added.
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Adds a new solution of a given map. Returns the position, at which the solution was added. The date of the solution is the current date.
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Changes the info of a given solution.
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Returns the date, when the solution was made.
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Deletes a given solution of a map.
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Returns the number of gem changes in the solution.
|
|
Returns an index for a given map. If there is not info for the map, -1 will be returned. If you have the index, the lookups will be much faster. |
|
Returns true, if a last attempt for the given map exists.
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Returns true, if a solution for the given map exists.
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Returns additional info for a solution.
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Returns the movements of the last attempt.
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Returns the number of linear pushes in the solution.
|
|
Reads in all previos stored levels.
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Returns the movements for a given solutions of a map.
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Returns the number of moves in the solution.
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Returns the number of solutions of a give map.
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Returns the number of pushes in the solution.
|
|
Stores all modifications.
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
Sets a new last attempt of a given map.
|
|
Here we store the date.
|
|
Here we store the number of gem changes in the solution.
|
|
Here we store the info.
|
|
Here we store the last attempts.
|
|
Here we store the number of linear pushes in the solution.
|
|
Here we store the id strings of all maps and their associated number.
|
|
Here we store the number of moves in the solution.
|
|
Here we store the number of pushes in the solution.
|
|
Here we store the the solution movements.
|
|
If true, the solution was modified.
|