Skip to content

Completed#3

Open
arpanrau wants to merge 29 commits intosd16fall:masterfrom
arpanrau:master
Open

Completed#3
arpanrau wants to merge 29 commits intosd16fall:masterfrom
arpanrau:master

Conversation

@arpanrau
Copy link

No description provided.

Copy link

@runnersaw runnersaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should actually be the w key instead of the up arrow

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments