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

Add a Stop Button like the BeeBot Stop Button #23

Merged
merged 16 commits into from
Nov 2, 2017

Conversation

gregcorbett
Copy link
Collaborator

closes #13

  • Rework BeeBot memory pushing out to allow for the Stop Button to not get
    stuck behind the entire memory contents. Every GameLoop, if the BeeBot is
    'running' it will either move or push out an single instruction or stop moving.
    This allows for the 'Stop' functionality to work.
  • Buttons can now be part of a ButtonGroup but not displayed. This prevents
    'Runtime Error: dictionary changed size during iteration' problems.
  • Add the ability to retrieve a specifc Button from the ButtonGroup by name, so
    it's display state can be toggled.
  • Buttons can now only be clicked if displayed
  • Adds start and stop movements methods to toggle the state of the BeeBot and
    Go/Stop Button
  • In order to get the stop button to work correct, the game loop ifs where
    changed to elifs and there order was changed so only one gets executed per
    game loop which helps with events being handled in the correct order and
    only 'one at a time'.
  • Adds test cases for new functionality, using simulated mouse clicks. This
    led to some changes in the test case to support mouse clicks rather than
    events being processed.
  • Also adds 'Stop' functionality via the keyboard

Fishysituation and others added 15 commits October 31, 2017 22:05
- Change Beebot class and start_logic loop structure to
  allow stop button work as physical beebot works.
- Occaisional Runtime Error: dictionary changed size during iteration
- so we can have a Go and Stop Button in the same place
- so we can set displayed for individual Buttons
- so that only one runs per loop
- make Stop button work better because it prevents
  Go and Stop being triggered in the same loop
- this was made easier by replacing flip with two seperate functions
  and required minimal changes/additions to GameWindow
- incase any movement events have already been pushed
@gregcorbett gregcorbett self-assigned this Oct 31, 2017
@gregcorbett
Copy link
Collaborator Author

codeclimate issues have been recorded in #24 and #27. They are outside of the scope of this pull request to fix here.

- prevents odd cases like the BeeBot continue to move after
  being reset, the BeeBot getting stuck in running mode with
  no instructions or the BeeBot being 'programmed' while
  running.
@gregcorbett gregcorbett merged commit 68baae4 into stfc:develop Nov 2, 2017
@gregcorbett gregcorbett deleted the stop_button branch November 3, 2017 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant