kneasle / wheatley

An AI for Ringing Room that can ring any number of bells to increase the scope of practices.
https://pypi.org/project/wheatley/
MIT License
15 stars 13 forks source link

On size change, check `Bot.next_row_generator`'s stage as well as `Bot.row_generator` #209

Closed kneasle closed 3 years ago

kneasle commented 3 years ago

This (hopefully) fixes a bug where the Wheatley in RR would sometimes crash after the tower size is reduced.

kneasle commented 3 years ago

but in the latter it could set the next_row_gen between the check starting and being set to None, so overwriting the correct one?

Hmmm that's good point. Either way, I'm not especially happy relying on the specifics of the SocketIO implementation - I guess it's worth slapping a mutex on Bot.next_row_generator. I'll do that now.