Ad
  • Custom User Avatar

    "The result of a combination cannot match with another tile on the same move" - this is not what happens in the example above. It's the opposite here, a tile is moving onto a combined tile. This is not allowed, but nowhere in the description does it state this.

  • Default User Avatar

    From description
    The result of a combination cannot match with another tile on the same move. In other words, 2222 => collapses to ##44 and not ###8

    Also description says Your function can modify the initial board value as much as you like.... Of course you can, but you won't pass the tests.

  • Custom User Avatar

    It's not mentioned in the description that once two tiles are merged, no other tiles can be merged into that same tile within the same move. This only becomes apparent from test cases.

    example move row to left:
    
    row: [2, 0, 2, 4]
    expected: [4, 4, 0, 0]
    
    if multiple merges would be possible: [8, 0, 0, 0]
    
    
  • Custom User Avatar

    Good point about Set. I've prefixed the test constructor so there's no name conflict.

    I'll also consider changing 'falsy' to null and undefined. Thanks for the feedback!

  • Custom User Avatar

    Set is a native class. You should not redefine it.

    User-defined classes ( ie, Constructor functions ) should, by convention, have names starting with a capital letter.

    Expecting "falsy" for null, undefined and NaN but not false, 0 or "" feels inconsistent. Easiest fix for that is possibly a different name, though I have trouble coming up with one that would naturally not include any of the others. Maybe you should just go with JS itself and expect "null" ( not the historically correct bug that is "object" ! ), "undefined" and "number".

  • Custom User Avatar

    Good catch. Fixed.

  • Custom User Avatar

    Some typos:

    sting -> string
    and array -> an array
    and object -> an object
    
  • Custom User Avatar

    I have added functions into the mix. My apologies if your solution became invalidated.

    I won't add any additional requirements to the kata from now on. (I'll only fix issues, if any come up)

  • Custom User Avatar

    I didn't think random tests would add much (if any) value to this kata so I didn't implement them initially, but I've added them in now that I see that a function with an array of strings passes the normal tests. The new test cases now test a randomized amount of assorted values from an array for each 'type', which should prevent any 'cheesing' like having the function return a set list of expected types.

  • Custom User Avatar

    I did forget the array test. Thanks, added it in.

  • Custom User Avatar

    Arrays are not tested.

  • Custom User Avatar

    No random tests.

  • Custom User Avatar

    I really enjoyed this kata. EXCELLENT JOB. The last bomb stumped me for months, though. So here's yet another hint for people, since none of the existing hints helped me enough...

    BOMB 10 HINT:

    If you've already been 'inspecting' the Bomb code, you're on the right path. This is a big clue for the entire kata, but there's more to the final bomb than just that. But do that for bomb 10 and it'll give you a pretty good hint in the form of a comment, which should reveal two tasks you need to complete.

    If you try to diffuse right away, you'll probably get an error (Something like "TypeError: ___ is not defined!"). There's a very good reason for the error, and part of solving the bomb includes ensuring that the error doesn't throw. Find out why the error throws, and you're halfway to solving bomb 10. The other half of bomb 10 solution is kind of similar in approach to some of the earlier bombs, but more complex.

    You can do it! I believe in you!

  • Custom User Avatar

    Either the tests are lacking or that was added after the translation was made and it wasn't added to the tests.

  • Custom User Avatar

    surprising that this works, i thougt it cal also be written as "three fifty" as per the description?

  • Loading more items...