wip: turn generation

This commit is contained in:
Ilia Denisov
2026-01-08 22:17:37 +02:00
parent 972cfd82be
commit b3de13b6e1
6 changed files with 223 additions and 2 deletions
+8
View File
@@ -234,6 +234,14 @@ func (sg ShipGroup) BombingPower(st *ShipType) float64 {
return number.Fixed3(result)
}
// JoinEqualGroups iterates over all races and joins their respective equal ship groups.
// Used in turn production.
func JoinEqualGroups(g *Game) {
for i := range g.Race {
g.joinEqualGroupsInternal(i)
}
}
func (g *Game) JoinEqualGroups(raceName string) error {
ri, err := g.raceIndex(raceName)
if err != nil {