Ad
  • Custom User Avatar

    I am struggling with this kata quite a bit. I have a very verbose and not so elegant solution that seems to be passing the vast majority of test cases.

    Now I think the error that im running into "Must return true if ships are touching" has to do with the priority that i use when removing ships. I start by removing the 4 cells, then 3, and then 2... however I have noticed that there are cases in which there can be multiple possible battleships and cruisers.

    so I guess my question is, is backtracking required to solve this kata?

  • Custom User Avatar

    Awesome Thank you! I wasn't sure if the interpreter needed to fail on its own or if I could throw my own exception but throwing my own exception worked! Thanks Benjaminz!

  • Custom User Avatar

    Having a little trouble with a particular test case. Test case "124X212", In this test case the middle character is not apart of the arithmetic required to return if the lucky string is true or false, and therefore does not throw a python error. Does anyone know how I should handle a case like this?

    Thanks

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    While I enjoy the idea of this Kata the instructions are extremely unclear. There is a lot of considerations that need to be made to determine if a player should hit or not. This Kata does not help us outline the considerations that tell the players to hit or not to hit. Unless they are always supposed to hit until they achieve 21 but that seems kinda silly. The win conditions are also not outlined well and that causes a lot of confusion.

    In its current state I would avoid this kata which is a shame cause it does seem like it could be a fun one :/ please update this!

  • Custom User Avatar

    Sorry, language is python

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    In case anyone was interested my problem was something really simple :/ when I copy pasted the rankCalc function from the increaseLevel function i forgot to switch the variable being setted to find enemy rank from enemy level. Therefore "You've been defeated" would never occur since self.rank was always equal to self.calcRank(enemy).

    Little tip for debugging. Scroll all the way down and use the tests at the bottom. The ones at the top while funny, will not provide you with insight necessary to debug.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Having a little trouble with this one. I am writing this in Java and most of my returns are correct. I just would like some clarification because im getting some returns of true that should be false. Are these sets supposed to be 1 to 1? For example, if I have a: {11,11} would i need b: {121,121} for the function to return true?

  • Custom User Avatar

    Oh geez lol, thank you for pointing that out! its been driving me crazy ALL DAY.

  • Loading more items...