refactor: planet owner

This commit is contained in:
Ilia Denisov
2026-02-04 19:26:17 +02:00
parent 6a603ea9ad
commit c1d397c993
17 changed files with 170 additions and 183 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ type BattleMeta struct {
func (g Game) RaceVotes(raceID uuid.UUID) float64 {
var result float64
for i := range g.Map.Planet {
if g.Map.Planet[i].Owner == raceID {
if g.Map.Planet[i].OwnedBy(raceID) {
result += g.Map.Planet[i].Votes()
}
}