Initial attempt at both Panda Levels and Tiger L-1#7
Initial attempt at both Panda Levels and Tiger L-1#7codeblahblah wants to merge 7 commits intoRubyoffRails:masterfrom
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.
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 [email protected]
|
|
@jwo Any other way? Can I consider the assignment complete? |
minitest/navy.rb
Outdated
There was a problem hiding this comment.
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?