sourcebots / competition-simulator

A simulator for Smallpeice Virtual Competitions
https://docs.sourcebots.co.uk/
MIT License
0 stars 0 forks source link

Handle token scorer setting every token to ARENA before closing #76

Closed WillB97 closed 3 years ago

WillB97 commented 3 years ago

This is caused by a race condition between the token_controller and token_scorer. This causes no tokens to be detected on the first and last token scan.

Since the beacons are always visible and driven by the token_controller we can detect this race condition by detecting when the beacons have not been picked up.

Obviously this doesn't fix matches that have already run but will stop it occuring in future matches.

PeterJCLaw commented 3 years ago

However it's just occurred to me that I've not checked the inverse -- that this does still correctly move tokens out to arena when it should do naturally.