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

Make ButtonState an Enumerator #43

Closed
wants to merge 1 commit into from

Conversation

treyshaffer
Copy link
Contributor

This seems like an ideal place to implement an enumerator. Sure, we may be at qualifiers right now, but I think it would be a more logical set-up for future builds. Note: I haven't checked other dependent files and changed to follow this standard, I was just scrolling through and saw this during some down time.

This seems like an ideal place to implement an enumerator. Sure, we may be at qualifiers right now, but I think it would be a more logical set-up for future builds. Note: I haven't checked other dependent files and changed to follow this standard, I was just scrolling through and saw this during some down time.
@smo-key
Copy link
Member

smo-key commented Jan 31, 2016

@blurryzombie, that's a good idea.

We used integers instead of a constructed enum because of the dependencies in Controller and the MonkeyC classes - changing this would require calling .get() about a hundred times because these classes currently store button states as integers: doing so allows us to serialize them easily into a very compressed form in JSON like { du: 0, dd: 0.6, etc. }. This is equally possible with enums, but we'll have to test whether enums and ints truly serialize in the same way (my instinct is that they have similar, but not exactly identical, serializations.)

@treyshaffer treyshaffer closed this Jul 3, 2024
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.

2 participants