I can’t understand why this section of the code does not remove the “tactics” (tuples) from the list [tuples ()]
def _cleanup(self):
for tactic in self._currentTactics:
if tactic[0] == "Scouting":
if tactic[1] in self._estimate.currently_visible:
self._currentTactics.remove(tactic)
elif tactic[0] == "Blank":
self._currentTactics.remove(tactic)
elif tactic[0] == "Scout":
self._currentTactics.remove(tactic)
Screenshots of my IDE (pydev) with additional debugging information are available at:
http://imgur.com/a/rPVnl#0
EDIT: Fixed a bug that I noticed and improved. To clarify, the "Form" is removed, the "Scouting" is deleted if necessary, and the tactics of the "Scout" is NOT deleted afaik.
source
share