Although assignTargets() works, it is not efficient.
For some reason, teammates can be put next to each other in the list. I still haven't figured out why this exception occurs.
For now, the code works but it takes a brute force approach, rerunning assignTargets() until no teammates are next to each other.
Ideally, the algorithm for assignTargets() will be rewritten so that assignTargets() works the first time.