Ad
  • Custom User Avatar

    "-> nope, that list of attacks leads actually to the numbers 2,2,1,1, boats 1 & 2 sunken, the "3" untouched."

    I do indeed get the numbers 2,2,1,1 and thus 1 boat is sunken, 1 damaged, and 1 untouched. Just like the second sample test case is expecting. I am solving in ruby.

    So this is in contrast to the result that Blind4Basics gave that 2 boats are sunken. I got confused by that comment and somehow overlooked that boat 1 had a length of 3 in the example given.

    Anyway nice kata, I did get confused but that is not necessarily bad practice in my opinion.

  • Custom User Avatar

    i get that this is a code kata and probably designed to be counter-intuitive but i'm not sure who in their right mind would ever lay out a grid like that. Luckily ruby has a reverse function :)

  • Default User Avatar

    I had exactly the same problem. I don´t know why the coordinates are upside down, but worse than that, test case number 1 works by mere chance if you do it the wrong way.

  • Custom User Avatar

    read again the description, you're definitely not applying the coordinates correctly. ;)

  • Custom User Avatar

    Hi,

    • first, that's not an issue, that's a question. ;) (issues are for non working katas, erorrs in the tests,...)
    • second, read again the description, you're missing the main information, here.
    • "I get the numbers 0, 0, 1, 1" -> nope, that list of attacks leads actually to the numbers 2,2,1,1, boats 1 & 2 sunken, the "3" untouched.