refactor: planet owner
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user