Skip to content

Commit

Permalink
Rename a variable to a more meaningful name
Browse files Browse the repository at this point in the history
pwiecz committed Jan 16, 2021
1 parent d8448de commit 99e0f7d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/game_state.go
Original file line number Diff line number Diff line change
@@ -661,12 +661,12 @@ nextUnit:
supplyUse *= 2
}
if unit.SupplyLevel < supplyUse {
unit2 := s.units[unit.Side][unit.SupplyUnit]
if !unit2.IsInGame {
unit2 = s.units[unit.Side][unit2.SupplyUnit]
supplyUnit := s.units[unit.Side][unit.SupplyUnit]
if !supplyUnit.IsInGame {
supplyUnit = s.units[unit.Side][supplyUnit.SupplyUnit]
}
unit.ObjectiveX = unit2.X
unit.ObjectiveY = unit2.Y
unit.ObjectiveX = supplyUnit.X
unit.ObjectiveY = supplyUnit.Y
t := Move
if v9 > 0 {
t = Defend

0 comments on commit 99e0f7d

Please sign in to comment.