for (i, base) in enumerate(game.state.baseq):
basetbl.append((i, (base - sc).distance()))
if game.state.baseq > 1:
for (i, base) in enumerate(game.state.baseq):
basetbl.append((i, (base - sc).distance()))
if game.state.baseq > 1:
# look for nearest base without a commander, no Enterprise, and
# without too many Klingons, and not already under attack.
ifindit = iwhichb = 0
# look for nearest base without a commander, no Enterprise, and
# without too many Klingons, and not already under attack.
ifindit = iwhichb = 0