From: Christian Heller Date: Sun, 3 Aug 2014 19:20:02 +0000 (+0200) Subject: Server: Improve comment description on dijkstra_map(). X-Git-Tag: tce~670 X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/%7B%7Byoutube_prefix%7D%7D%7B%7Bvideo_id%7D%7D?a=commitdiff_plain;h=fa4a1c651a7b5221780fc7c6ddc1fdc17bc8a0bb;p=plomrogue Server: Improve comment description on dijkstra_map(). --- diff --git a/src/server/ai.c b/src/server/ai.c index 5be48f3..c613928 100644 --- 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 - * directions. If it's neighbors are low enough that the result would be lower - * than the current value, 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 score, re-set it to 1 point higher than its lowest-scored * 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);