Conversation
runnersaw
left a comment
There was a problem hiding this comment.
Great job. Good design of your classes and methods. Your code is very modular and well-designed.
As far as commenting and docstrings, it was very good. If anything, I'd advise you to learn where not to use comments. (Yes, it's better to over-comment than under-comment). However, comments that explain one line of very simple code aren't very helpful to the reader. I'd generally constrain yourself to explaining whole functions, portions of related code, or particularly complex lines of code with your comments.
The largest stylistic thing I'd like you to improve is for you to spatially separate related portions of code. I'd like spaces between functions and between related portions of those functions (and also with a comment before those related portions of functions). This just makes it easier to read.
| """Model of Lander, with attributes, X,Y,Rotation,Fuel,dX, and dY | ||
| and methods gravity_update ,roll, and fire_thrusters""" | ||
| def __init__(self): | ||
| self.X = 100 #Lander X coordinate in Pixels |
There was a problem hiding this comment.
Generally, it's stylistically better to name your class attributes beginning with a lowercase letter. Generally, it's convention to name instances of a class with a lowercase letter, and name the class itself with an uppercase letter. In this case, X, Y, Fuel, etc. are all instances and not a class themselves, so they should all be lowercase
| To get it to work you will need to install Python 2.7 as well as py.game - a module | ||
| for creating simple raster games using Python | ||
|
|
||
| You then run mars_lander_mvc.py to start and play the game |
There was a problem hiding this comment.
This should actually be Mars_lander.py.
|
|
||
| You then run mars_lander_mvc.py to start and play the game | ||
|
|
||
| You use the a and d keys to control the sideways translation of the lander and the up |
There was a problem hiding this comment.
This should actually be the w key instead of the up arrow
No description provided.