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

Refactor with OOP #17

Open
matt-dray opened this issue Feb 8, 2022 · 1 comment
Open

Refactor with OOP #17

matt-dray opened this issue Feb 8, 2022 · 1 comment
Labels
meta 🧠 Thinking about thinking about the game upgrade 🆙 New feature or request

Comments

@matt-dray
Copy link
Owner

matt-dray commented Feb 8, 2022

I wondered how far I could get without classes. I think this (0.0.0.9004) is far as I want to go without tripping over spaghetti.

Create a player class and then parent classes for enemies, food, maybe rooms, etc, where individual instances of each one inherit their respective parent class.

S3 (benefit of no dependency) or {R6} (benefit of having used it before and possibly better organisationally).

Of course, Giora's approach can be referenced.

@matt-dray matt-dray added meta 🧠 Thinking about thinking about the game upgrade 🆙 New feature or request labels Feb 8, 2022
@matt-dray
Copy link
Owner Author

I think this should be done properly in {r.oguelike2}. {r.oguelike} is function-driven spaghetti that's not really expandable. Consider it a proof-of-concept toy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta 🧠 Thinking about thinking about the game upgrade 🆙 New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant