equal
deleted
inserted
replaced
183 repeat |
183 repeat |
184 CurrTeam:= Succ(CurrTeam) mod TeamsNumber; |
184 CurrTeam:= Succ(CurrTeam) mod TeamsNumber; |
185 CurrentTeam:= Teams[CurrTeam]; |
185 CurrentTeam:= Teams[CurrTeam]; |
186 with CurrentTeam^ do |
186 with CurrentTeam^ do |
187 begin |
187 begin |
188 PrevHH:= CurrHedgehog; |
188 PrevHH:= CurrHedgehog mod HedgehogsNumber; // prevent infinite loop when CurrHedgehog = 7, but HedgehogsNumber < 8 (team is destroyed before its first turn |
189 repeat |
189 repeat |
190 CurrHedgehog:= Succ(CurrHedgehog) mod HedgehogsNumber; |
190 CurrHedgehog:= Succ(CurrHedgehog) mod HedgehogsNumber; |
191 until (Hedgehogs[CurrHedgehog].Gear <> nil) or (CurrHedgehog = PrevHH) |
191 until (Hedgehogs[CurrHedgehog].Gear <> nil) or (CurrHedgehog = PrevHH) |
192 end |
192 end |
193 until ((CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog].Gear <> nil) and (not CurrentTeam^.hasGone)) or (PrevTeam = CurrTeam); |
193 until ((CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog].Gear <> nil) and (not CurrentTeam^.hasGone)) or (PrevTeam = CurrTeam); |