- The Struct list_s could be made to a typedef, and *path declared only inside the findpath function, eliminating the need for the initnodes() function.
- node.onopen and node.onclosed could become one variable of either TRUE, FALSE, or NULL.
- There's no need to keep the f value on the list.
- The instances of 40 need to be replaced with a constant tilesize or even tilew and tileh.
- The map and its associated dimensions could all be passed to the findpath function.
- Some error checking needs to be included, such as what if there is no possible path? At the same time, some checks already included might be able to be removed.
Oh yeah, and on a side note, I've noticed that the code syntax highlighter I'm using (http://www.dreamprojections.com/syntaxhighlighter) doesnt seem to work properly in Firefox for Ubuntu. I'm not sure if its working in other firefoxes (such as windows) but it does work in Internet Explorer, which is what I'm using most of the time (I know - dont ask!).
No comments:
Post a Comment