RogerBacon
King
- Joined
- Nov 16, 2003
- Messages
- 649
What is the best way to find out which uints are in a city? Currently I plan to use onCityDoTurn. Here is the rest of the logic:
unitList = iPlayer.getUnitList()
for c in range(len(unitList)):
[tab]unit = unitList[c]
[tab]#todo: get city's plot x,y and compare it to each unit's x,y
If this is a good way to do it then I only need help with the syntax for the last line. If I'm totally off track then any suggestions on a better way would be appreciated.
Roger Bacon
unitList = iPlayer.getUnitList()
for c in range(len(unitList)):
[tab]unit = unitList[c]
[tab]#todo: get city's plot x,y and compare it to each unit's x,y
If this is a good way to do it then I only need help with the syntax for the last line. If I'm totally off track then any suggestions on a better way would be appreciated.
Roger Bacon