FS#9191 - Revamp of maze plugin code (apps/plugins/maze.c)
Opened by William Poetra Yoga Hadisoeseno (wpyh) - Sunday, 13 July 2008, 19:19 GMT
Last edited by Jonathan Gordon (jdgordon) - Tuesday, 15 July 2008, 13:49 GMT
I've revamped the code in apps/plugins/maze.c while fixing the bug in
1. Whitespace changes.
2. Code cleanups.
3. Comments for non-trivial code blocks.
4. Make all functions static.
5. Reorder and regroup several functions.
6. Use border-detection macros instead of border property bits, use 8 bit entities for each cell.
7. Only solve the maze the first time maze_solve() is called.
8. Add and use maze.show_path to control whether the solution is displayed.
9. Modify the path bits only in maze_solve().
10. Modify the algorithm in maze_solve() to make it clearer.
11. Link together the solution instead of showing discrete blocks.
12. Rewrite maze_pick_random_neighbour_cell_with_walls(), and remove coord_stack_count() and coord_stack_get().
13. Rewrite the coordinate stack operations, use arrays of x and y coordinates.
14. Remove bug workaround with rb->yield() when quitting.
Tuesday, 15 July 2008, 13:49 GMT
Reason for closing: Accepted