SMLabyrinth

SMLabyrinth.png
This program is a complete version of a labyrinth game.

The goal of the game is to reach the nearest door from the start point in all the different levels, in order to gain an higher score. Every schema, in which the difficult increase compared to the increasing of the number of the level, contain an unique start point and more doors. The player, to gain the highest score, has to reach with the minimum possible number of steps and in the minimum time, the nearest door. Once a schema is finished, it will be shown the gained score and then another schema will be reach until the completion of the all (10) levels. At the end of the game it will be possible to save the achieved record, in order to keep a record chart, displayable using the Options menu. The player can starts a new game using the entry "New game" from the File menu, or open a single schema using the entry "Open game".

The best route is estimate using the function bestroute, which uses a recursive algorithm to locate the nearest door to the start point.

In all the schemas, the cost of every step in the route has an unitary value and the final score for each schema is calculated in following way: The percentage of correctness of a route made by a player is calculated with this formula:
perc = (num_step_best_routes) / (num_step_player) * 100
If the rusultant percentage is longer or equals then a set value (see default), a bonus (see default) is added to the final score. Otherwise, it's possible to score a penality (see default). For the current level (current_level), the gained score is calculated with this formula:
points = ceil( current_level * ( bonus + perc ) / ( elapsed_time / ( 1 + SEC_PER_LEVEL * current_level ) + 1 ) )
where elapsed_time correspons to the elapsed time to finisch the level and SEC_PER_LEVEL (see default) to the maximum number of seconds allowed to finish the schema.

The program is composed by the following modules:

The dependences between the different modules are shown in the following graph:

schema_modules.png

The compiling process and the generation of the documentation of the project are managed using the command make.

Author:
private, MrC

Generated on Fri Apr 2 18:27:33 2010 for SMLabyrinth by  doxygen 1.5.8