Ad
  • Default User Avatar

    It was difficult, but I liked it!

  • Custom User Avatar

    Indentations were not that messed up when I clicked submit, sorry ^^"

  • Custom User Avatar

    Thanks, this was a fun kata, it can be solved with a nice variety of approaches.

  • Custom User Avatar

    @Koolong, thanks for explaining! @benjaminzwhite, next time I will try to phrase my english properly :)

  • Default User Avatar

    @Kooloog ah thanks for this - I thought @LS2008 was confused about the question/description itself.

    @LS2008 - thanks for noticing this! In future you can always post actual logs of the tests that seem to be incorrect/behaving weirdly, that makes it much easier for people to review any eventual errors.

  • Custom User Avatar

    Just checked and random tests did in fact start with the field after the explosions (due to the array being passed as a reference to the sample function which returns the expected result), which could make it easier to cheese this kata. This has now been fixed. What you have to do now is simulate the explosions yourself, and then finding the safe spots.

  • Default User Avatar

    Hi @LS2008 - in all cases/tests the kata is asking you to determine "all the locations where you will be safe". You need to return a list of the coordinates where you can stand to avoid any explosion.

    The tests are always with the mine field before any explosions (because otherwise, the safe locations would already be determined) and therefore it's up to your algorithm to determine which cells will be "reached" by the given mines' explosion pattern, and which cells will not be reached (these are the safe spots!).

  • Custom User Avatar

    So... What does this kata want you to do? In python, the sample cases are before explosing (no 'C's), while in the random sample cases this is after the explosion?

  • Custom User Avatar

    The kata description states that "The last session in the array cannot end after the cinema closes". The session starting at 2:30 would end after the cinema closes at 3:00, which is why it isn't in the list. Hope this helps!

  • Default User Avatar

    Hi everybody!
    Could you please explain why 2:30 can't be in the list of sessions?

  • Custom User Avatar

    Pretty hard for a 7!

  • Custom User Avatar

    Added :)

  • Custom User Avatar

    ( JS )

    missing chai.config.truncateThreshold = 0

  • Custom User Avatar
  • Custom User Avatar

    Alright, I think I understood what you meant now ;)
    I computed the expected solution before making the assertion:

    expected = ex_mine_field(field)
    test.assert_equals(safe_mine_field(field), expected)            
    

    Is this correct?

  • Loading more items...