Refactoring the game and adding unit tests, making it simpler and faster to reuse from a search algorithm, as well as supporting easy test cases/replays.
Modified all the bots to cope with 0-indexed players as per the new API.  This simplifies the code a lot and is worth the switch.  Exhaustive tests and the bots perform in almost identical ways as before.