ludic.zones: a player's radius never past no fog's 900 m
A 1 km fog gave a 1040 m zone, more of the world than no fog's 900 m (2405 MB and 1029 nav tiles against 2294 MB and 753 in the fog profile). zones_radius is min(max(fog + 40, 150), 900); the test holds 1 km and 860 m at 900. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
b2550ca58a
commit
509b5ef111
3 changed files with 7 additions and 4 deletions
|
|
@ -44,9 +44,11 @@ program ZonesTest {
|
|||
expect(Math.abs(zones_nearest(zones_st, 350.0, 100.0) - 100.0) < 0.001)
|
||||
}
|
||||
|
||||
test "a player's radius: past the fog, never under the least, the horizon with none" (zones_st: mut ZonesState) {
|
||||
test "a player's radius: past the fog, never under the least nor over no fog's" (zones_st: mut ZonesState) {
|
||||
expect(zones_radius(0.0) == ZONES_NO_FOG)
|
||||
expect(zones_radius(30.0) == ZONES_LEAST)
|
||||
expect(zones_radius(500.0) == 540.0)
|
||||
expect(zones_radius(1000.0) == ZONES_NO_FOG) # a kilometre's fog keeps no more than none
|
||||
expect(zones_radius(860.0) == ZONES_NO_FOG)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue