Ad
  • Default User Avatar

    I had no idea when I typed it. I just like it better when there are few stuff to concatenate, and I really dislike the syntax of /format/.

    I suspect concatenation is slower. I just did some /timeit/ to check if that is true:

    1. /format/ is indeed faster than concatenation, but not much (something like 2 to 5% faster).
    2. /%/ is twice as slow as concatenation.

    But I only tested this case : 2 numbers that must be stringified. I imagine that with 2 strings, concatenation might be faster. And if there are more objects to print, I imagine that /format/ would be faster.

    But I still hate /format/ syntax :-) (and I even still like /%/ syntax better)

  • Default User Avatar

    This test description is wrong :

    Test.it('should return the decoded message HNTP*!', function() {
    Test.assertEquals(results, "HNTP*", 'returns HNTP*!');
    });

    No '!' is expected.

  • Default User Avatar

    There are no pound signs (£) in Ruby test cases. Shouldn't it be removed from the description too, for the sake of consistency?

  • Default User Avatar

    I see that it was already told by jcorbin 2 years, but I will rephrase it with my own vocabulary: I have not the slightest fucking idea of what I am expected to do in this kata. The description of the problem says nothing at all about what the hell should match what.

  • Default User Avatar

    Tests seem OK now... except the description of the latest one does not match what it really tests :-)

    In the string,
    3 times 'u' should be 8 times,
    3 times 'r' should be 1 time.

    PS: That is for Javascript, I did not look at the C# version.

  • Default User Avatar

    By "already guessed", do you mean both right and wrong, or only right?

    In the first case (which means the guess is also ignored if the letter was already proposed and wrong), the following test should pass:

    Test.describe(Testing the word 'wars' with input 'wuuuuuuuuusarg', _ => {
    let hangman = new Hangman('wars');

    Test.assertEquals(hangman.guess('w'),'w _ _ _');
    Test.assertEquals(hangman.guess('u'),'w _ _ _ # u');
    Test.assertEquals(hangman.guess('u'),'w _ _ _ # u');
    Test.assertEquals(hangman.guess('u'),'w _ _ _ # u');
    Test.assertEquals(hangman.guess('u'),'w _ _ _ # u');
    Test.assertEquals(hangman.guess('u'),'w _ _ _ # u');
    Test.assertEquals(hangman.guess('u'),'w _ _ _ # u');
    Test.assertEquals(hangman.guess('u'),'w _ _ _ # u');
    Test.assertEquals(hangman.guess('s'),'w _ _ s # u');
    Test.assertEquals(hangman.guess('a'),'w a _ s # u');
    Test.assertEquals(hangman.guess('r'),'You found the word! (wars)');
    Test.assertEquals(hangman.guess('g'),'The game has ended.');
    });

    Problem: my program passes your test suite but does not pass this test.

  • Default User Avatar

    Shouldn't the description tell what is the expected behaviour when the player proposes a letter that he already tried (and either guessed or missed)? Or state that the player never tries twice the same letter.