Add boolean change and T flip-flop evaluatable#2072
Merged
diogotr7 merged 3 commits intoantonpup:devfrom Jun 8, 2020
Wibble199:feature/more-evaluatables
Merged
Add boolean change and T flip-flop evaluatable#2072diogotr7 merged 3 commits intoantonpup:devfrom Wibble199:feature/more-evaluatables
diogotr7 merged 3 commits intoantonpup:devfrom
Wibble199:feature/more-evaluatables
Conversation
…es the state if that boolean is true. Renamed `Boolean_Latch` to `Boolean_FlipFlopSR`.
gitmacer
suggested changes
Jun 7, 2020
| public Boolean_FlipFlopT(Evaluatable<bool> toggle) => Toggle = toggle; | ||
|
|
||
| protected override bool Execute(IGameState gameState) { | ||
| if (Toggle.Evaluate(gameState)) |
Contributor
There was a problem hiding this comment.
It should only toggle if it got false since last toggle. I know you can "fix" it with the boolean change detector but I still think this change should be done. Everyone that worked with graphical programming before will expect it works like that.
Collaborator
There was a problem hiding this comment.
I think the current approach makes the most sense and is the most flexible. I don't consider adding a change detector to be a 'fix', for both options to be available, you'd need to add something one way or the other. This way it's more clear what each evaluatable does.
diogotr7
approved these changes
Jun 8, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds two new evaluatables:
The existing "Flip-Flop" (
Boolean_Latch) has been renamed to "Flip-Flop (Set-Reset)" (Boolean_FlipFlopSR) to clarify the type of latch it behaves as.