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

Planet Express in Ruby, Java and Python #8

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

kdefliese
Copy link

I didn't make a real game; instead I wrote a little hardcoded program to make sure that all languages were giving the same output.

Are all these Java files supposed to show up, or should they be gitignored somehow?

@kariabancroft
Copy link

The main files you will most likely not check in are the .class files. These are usually generated when the project is compiled which usually happens when the whole thing is built and not part of commits.

@@ -0,0 +1,74 @@

public class Crew {
int thirst = 50;

Choose a reason for hiding this comment

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

Consider using constants for these values

Copy link
Author

Choose a reason for hiding this comment

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

I'm not sure I understand what you mean by using constants. Isn't the game supposed to change the value of the thirst, horde, etc? How can those values change if they're constants?

Choose a reason for hiding this comment

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

Sorry, I mean for the 50s. If you wanted to change the start value for all properties, you could just change the constant one time.

Copy link
Author

Choose a reason for hiding this comment

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

Ohhh I see, thanks for the clarification

@kariabancroft
Copy link

Same goes for the compiled python code with the .pyc extension

@kariabancroft
Copy link

Nice! I like the way you wrote your code with a sort of TDD approach !

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