Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
python initial code has a tab character in it
(sample tests and tests too)
JS
Tests throw seconds. Didn't see about seconds in task, but lose time with needless calculatings seconds.
Task closed due setting seconds to 0 into code.
NASM translation
it's underspecified whether
hours
is between[0, 12[
,[1, 12]
, or[0, 24[
. There were originally fixed tests for12:00
,00:00
and12:30
. If both00:00
and12:00
are valid then it cannot be a 12-hour clock as specified in the description, and tests for hours between[12, 23]
should be added.Conversely, if tests for
00:xx
are deleted, then it can be a 12-hour clock with hands in[1, 12]
.no random tests in Ruby
Coffeescript translation kumited. Have fun! ;-)
This comment is hidden because it contains spoiler information about the solution
I keep getting one single error in final tests when comparing Ace of Hearts and 10 of Hearts. I've tried making my own tests with same cards and they pass as they should:
Test.expect(new Card(Card.HEARTS, 1) > new Card(Card.HEARTS, 10)); => Test Passed;
Test.expect(new Card(Card.HEARTS, 1) < new Card(Card.HEARTS, 10)); => Value is not what was expected;
Test.expect(new Card(Card.HEARTS, 1) == new Card(Card.HEARTS, 10)); => Value is not what was expected;
All the other comparisons in final test pass as well. Is there something wrong with final tests?
I was stuck on a few tests for a long time due to assumptions made from reading the description. A lot of frustration could have been avoided with the following changes:
"Upon initialization, a deck is filled with 52 cards (13 from each of 4 suits)."
I read this as suggesting that a
new Deck
would be filled/passed the 52 cards, not that we should produce that ourselves. In retrospect I realize it makes perfect sense that the deck should clearly have that ability itself. However, the wording really misled me into thinking it wasn't the deck's responsibility.Perhaps "a deck is filled with" should read "your deck should fill itself with".
"Cards must be Comparable to other cards. Compare the ranks of the cards only."
This could definitely be clearer as to its intention. I gave up on this kata as my logs showed perfectly equal cards, and the fail messages simply said they weren't equal. I couldn't sniff out how they were being compared either. The error messages could be refined or at least the description.
Perhaps "Cards must be comparable to other cards." (capitalization of Comparable is misleading) "The value of a Card object should return its rank for the purpose of comparing two Cards."
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution