Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Early bobs not working in 0.6.0 #166

Open
kneasle opened this issue Mar 27, 2021 · 4 comments
Open

Early bobs not working in 0.6.0 #166

kneasle opened this issue Mar 27, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@kneasle
Copy link
Owner

kneasle commented Mar 27, 2021

This happens if the first call of a touch happens in rounds, and I'm pretty sure this is because in RR the RowGenerator is not created until the method starts, which means it doesn't get to see any incoming calls.

@kneasle kneasle added the bug Something isn't working label Mar 27, 2021
@centreboard
Copy link
Collaborator

Looks like the generator assigned on Look To, after which calls should be passed to it

wheatley/wheatley/bot.py

Lines 182 to 183 in 1bbdc8e

self.row_generator = self.next_row_generator or self.row_generator
self.next_row_generator = None

But we reset the generator's state as the method starts

self.row_generator.reset()

def reset(self) -> None:
""" Reset the row generator. """
self.logger.debug("Reset")
self._has_bob = False
self._has_single = False
self._index = 0
self._row = self.rounds()

The reset could be earlier, e.g. on Look To. I don't think it would have any other impact

@kneasle
Copy link
Owner Author

kneasle commented Mar 30, 2021

Oooh wait so does that mean that this is a 0.6.0 issue?

The reset could be earlier, e.g. on Look To. I don't think it would have any other impact

Wouldn't the same problem happen if people start again without stopping the touch (i.e. just go again whilst still in rounds).

@centreboard
Copy link
Collaborator

Good point, there would need to be a reset when Wheatley starts ringing rounds after That's all (or a future call of Rounds)

@kneasle
Copy link
Owner Author

kneasle commented Mar 30, 2021

Yeah although if we're modelling Wheatley's behaviour as a state machine, then we should reset every time Wheatley enters the 'ringing rounds' state.

@kneasle kneasle changed the title Early bobs not working in the RR version Early bobs not working in 0.6.0 Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants