Files
TravianZ/GameEngine
Ferywir 7ec51902fd Refactor(sendunitsComplete): extract calculatePopulations() [#155]
Move the attacker/defender total-population computation (and the two
getProfileVillages() lookups that feed it) out of the per-attack loop into a
dedicated private method. Behaviour-preserving: the method takes the initial
$defpop/$attpop (0 for villages, 500 for the oasis branch) and accumulates onto
them exactly as before, and returns the village lists ($varray/$varray1) used
later for the can-destroy check and handleConquest().

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 10:32:41 +03:00
..
2026-05-15 08:17:14 +03:00
2026-05-15 08:17:14 +03:00
2026-05-07 08:24:40 +03:00
2026-05-18 09:26:19 +03:00
2026-05-28 12:25:28 +03:00
2026-05-18 11:12:15 +03:00
2026-05-15 08:17:14 +03:00
2026-05-15 08:17:14 +03:00
2026-06-09 15:15:27 +03:00
2026-05-15 08:17:14 +03:00
2026-05-15 08:17:14 +03:00