CleanCut / invaders

Open source terminal arcade game with audio - based off of the classic "Space Invaders"
206 stars 107 forks source link

feat: Add a game menu to replay the game #4

Closed sp-luciano-chinke closed 3 years ago

sp-luciano-chinke commented 3 years ago

Hi!

After finishing your Ultimate Rust Crash Course in Udemy, you encouraged me into trying to do something new in Rust (thanks! ^^). I'm still a begginer, but I would love to have Rust as my main language in the future.

I decided to try to create a system to manage a game menu where the user can choose to start a new game or end it. I also made some tweaks trying things and probably left a couple of comments like 'How can I improve this?' as a self reminder. The Menu reuses the Frame grid to avoid much more code.

Hope you like it ^^!

CleanCut commented 3 years ago

Cool! I tried it out real quick just to make sure it works. I'm heads-down working on Rusty Engine to get it ready for a live-session I'm doing on O'Reilly next Tuesday, so I've put this on my list to do a thorough code review later on next week.

In the meantime, feel free to continue refining it and pushing new commits up to this branch if you like. 😄

CleanCut commented 3 years ago

@sp-luciano-chinke I'm ready! Before I can give this a proper review, it needs the changes in master merged in and resolved. I've actually already done that, but I don't have permissions to push the change to your fork.

Can you check the [ ] Allow edits by maintainers checkbox on this pull request so I can push that up?

image
sp-luciano-chinke commented 3 years ago

@CleanCut Done (Allow edits by maintainers check)! Sorry for the inconveniences, it's my first time contributing in an open source project. Thanks for the advice on .gitignore file, I've already set it up for future cases. Nice tip! :)

sp-luciano-chinke commented 3 years ago

Hi @CleanCut !

Thanks all the feedback given here, really appreciated. I applied all the suggested changes and improved the use statements, hope you like them ^^! I was really trying to have the input handlers attached to Player or the Menu, but I couldn't find an easy way to do it. Do you have any thoughts on that? 🤔

sp-luciano-chinke commented 3 years ago

Hi @CleanCut ! Already applied the gameloop fixes. Thanks for pointing them out! ^^