comparison tools/build.py @ 36:a464bd43b76c 1.0.0

clean documentation rewrite
author ark
date 2026-10-21 22:34 +0200
parents 85d23328a215
children
comparison
equal deleted inserted replaced
35:0d40f346059c 36:a464bd43b76c
169 169
170 # 4. masks 170 # 4. masks
171 171
172 def route_values(routes): 172 def route_values(routes):
173 """ 173 """
174 fill in length, turning and value of each route (balance.md, route 174 fill in length, turning and value of each route (doc/game.md, routes):
175 preference): the average of length relative to the longest route and 175 the average of length relative to the longest route and straightness
176 straightness relative to the straightest, that is the least turning. 176 relative to the straightest, that is the least turning.
177 """ 177 """
178 for r in routes: 178 for r in routes:
179 r["length"] = masks.polyline_length(r["points"]) 179 r["length"] = masks.polyline_length(r["points"])
180 r["turning"] = masks.turning(r["points"]) 180 r["turning"] = masks.turning(r["points"])
181 longest = max(r["length"] for r in routes) 181 longest = max(r["length"] for r in routes)