-
Notifications
You must be signed in to change notification settings - Fork 2
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
"lives" variable is unclear #2
Comments
Also instead of passing it around to functions consider having a game state instance that your objects reference. |
Hi, I think its to deactivate 'action' once the game has ended or you'll able to keep pressing attack and the attack sound still appear whilst this will deactivate once attack once game ends.. Yeah will clean up some of the variable names, oh and thanks for modulating my enemy class. |
I think you can definite make louds of improvements on the code.. I'm more of a hobbyist coder than it actually having to do with my day to day job so not learnt any 'best practice' rather learnt by looking at random codes on the internet as well as figuring stuff by myself so apologies for any poor code practice.., |
All good, I believe we are all "learning" something new everyday :) I am new to github collaboration so I dont know if I am really doing things the right way. I just wanted to help improve the code, not to derate you. |
I am humbled that anyone would want to look and improve my code, so don't worry about it, I always welcome constructive criticism :) , I have no idea what I am doing on github at all.., I know enough just to put some of my projects online so it might help other beginners. Once I find the time I will probably will go though my codes again and change the variables so they make a little more sense. |
7-Dungeons-Deep/game (mod version).py
Line 356 in 58d9f26
I had a hard time getting what "lives" was used for. Its sent to player as "bob" parameter
7-Dungeons-Deep/game (mod version).py
Lines 529 to 539 in 58d9f26
7-Dungeons-Deep/player.py
Lines 20 to 22 in 58d9f26
and then to missiles and fireball as "mom".
7-Dungeons-Deep/player.py
Line 43 in 58d9f26
7-Dungeons-Deep/proj.py
Lines 38 to 44 in 58d9f26
It seems to be set to "3" when the game is over and used for not playing sound effects
7-Dungeons-Deep/game.py
Lines 2006 to 2015 in 58d9f26
I am working on a branch to clean up some code and I am not really sure what this variable is intended to do. I could remove it but it would be annoying if you had plans on doing something else with it.
Instead of calling it lives, bob and mom, perhaps a less confusing name would be "ignore_audio" or "game_over" and make it a boolean?
The text was updated successfully, but these errors were encountered: