X-Git-Url: https://plomlompom.com/repos/do_todos?a=blobdiff_plain;f=src%2Fserver%2Fai.c;h=c6139287125f9881c1f0179b5e8b35225cfa4dda;hb=fa4a1c651a7b5221780fc7c6ddc1fdc17bc8a0bb;hp=5be48f3b7e00939ce19c2bbd5c2547dcaf68f91c;hpb=28d6fed30bc0501d5452c7fbdf41125ea8bef318;p=plomrogue 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);