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

Replace bools with enums where appropriate #41

Open
tomassedovic opened this issue Nov 20, 2014 · 2 comments
Open

Replace bools with enums where appropriate #41

tomassedovic opened this issue Nov 20, 2014 · 2 comments

Comments

@tomassedovic
Copy link
Owner

Things like setting fullscreen/windowed mode or whether path.walk should recalculate or not should use aptly-named enums instead of an opaque boolean that you have to dig into docs to figure out.

@jgilchrist
Copy link
Contributor

Is it possible that we could also replace the bitflags with enums? Most of them are just mutually exclusive settings anyway (we'd need to keep them internally to pass through to tcod-sys but it's a good opportunity to provide a nicer interface).

@tomassedovic
Copy link
Owner Author

I tried to use enums where the values were exclusive and bitflags where you could genuinely specify multiple options at once.

But yeah, I may have missed something and it's quite possible that we can design a better API for the bitflags cases, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants