home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
28d6fed
)
Server: Improve comment description on dijkstra_map().
author
Christian Heller
<c.heller@plomlompom.de>
Sun, 3 Aug 2014 19:20:02 +0000
(21:20 +0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Sun, 3 Aug 2014 19:20:02 +0000
(21:20 +0200)
src/server/ai.c
patch
|
blob
|
history
diff --git
a/src/server/ai.c
b/src/server/ai.c
index 5be48f3b7e00939ce19c2bbd5c2547dcaf68f91c..c6139287125f9881c1f0179b5e8b35225cfa4dda 100644
(file)
--- a/
src/server/ai.c
+++ b/
src/server/ai.c
@@
-26,13
+26,11
@@
static void get_neighbor_scores(uint16_t * score_map, uint16_t pos_i,
/* Iterate over scored cells in "score_map" of world.map's geometry. Compare
* each cell's score against the score of its immediate neighbors in N_DIRS
/* Iterate over scored cells in "score_map" of world.map's geometry. Compare
* each cell's score against the score of its immediate neighbors in N_DIRS
- * directions. If
it's neighbors are low enough that the result would be lower
- *
than the current valu
e, re-set it to 1 point higher than its lowest-scored
+ * directions. If
any neighbor's score is at least two points lower than the
+ *
current cell's scor
e, re-set it to 1 point higher than its lowest-scored
* neighbor. Repeat this whole process until all cells have settled on their
* neighbor. Repeat this whole process until all cells have settled on their
- * final score. Ignore cells whose position in "score_map" fits cells of
- * unreachable terrain in world.map.cells or whose score is greater than
- * "max_score". Expect "max_score" to be the maximum score for cells, marking
- * them as unreachable.
+ * final score. Ignore cells whose score is greater than "max_score". Expect
+ * "max_score" to be the maximum score for cells, marking them as unreachable.
*/
static void dijkstra_map(uint16_t * score_map, uint16_t max_score);
*/
static void dijkstra_map(uint16_t * score_map, uint16_t max_score);