-
Notifications
You must be signed in to change notification settings - Fork 9
Initial attempt at both Panda Levels and Tiger L-1 #7
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
base: master
Are you sure you want to change the base?
Conversation
|
Sure, looks great to me. (Though you don't need to ask my permission to continue) |
|
Thanks. Will keep that in mind in future. |
|
@jwo Add syntax to confirm that the Battleship can request more ammunition |
|
@jwo I used a Module instead of a Class for "Fate". |
minitest/navy.rb
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see you ever use the "FATE" constant. Is there a significance around it?
…e. Cleaned up Fate::Fate#hit_or_miss.
|
@jwo Refactored code. |
|
@jwo Is a Module the correct way to go about the assignment? |
|
It could be -- I don't dislike the approach. On Thu, Feb 13, 2014 at 1:51 PM, drammopo notifications@github.com
|
|
@jwo Any other way? Can I consider the assignment complete? |
minitest/navy.rb
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not seem complete, thoughts?
|
@jwo Having never played battleship...I had to read up on the rules. def has_a_ship?
true
end to def has_a_ship?
@battleship.max_hits > 0
end |
|
hmm, well you're not using has_a_ship as a counter. You're using it in a test: def test_have_a_battleship
assert_equal true, @another_admiral.has_a_ship?
end |
…Admiral has a ship'.
|
@jwo I'm now using the |
|
OK, sounds good. nothing else I have to comment on. |
@jwo Had to
@another_battleship = Battleship.newas I could notassert_equalon a Mock object.Also refactored TestBattleship by adding a #setup.
Am I green enough to continue with the rest of the assignment?