Update battleinterface.py

fixed looping bug