Beta

Bullseye!

Description
Loading description...
Games
Algorithms
  • Please sign in or sign up to leave a comment.
  • Voile Avatar

    Needs random tests.

  • Voile Avatar

    It's not a good idea to quote crucial kata information from (non-reputable) external sites. What if the site goes down or something?

    (There isn't that much information about what is a bust anyway, so no reason to just put it in the kata description)

  • ZozoFouchtra Avatar

    This comment has been hidden.

    • paragonHex Avatar

      Well, if you haven't play any darts game yet, you should see the table first: alt text As you can see, there are areas for every number from 1 to 20(x). If you land your dart in thoose areas you'll get that many points('x'). The trick is, that if you land it in the outer narrow area on the table, you get double the points ('dx'), and the inner narrow area triples your points('tx'). The innermost two circular areas, are the bull. The green one in the middle gives you 25 points('25'), and the red (the bull's eye) gives 50('d25'). If you do not hit the table you miss, so get 0('0') points to decrease with.

      Every turn of yours, you throw 3 arrows, decreasing your points with the amounts thoose yield, following the rules I linked earlier.

      As far my poor english allows it, the uppercase "always valid" should emphasise, that the input my tests provide will be strings representing throwable scores, so you won't have to test them, just work with them. So yes 'd19' and '1' are good. I hope this helps you.

      And please if you have a chance, throw a few IRL, it's fun!

    • ZozoFouchtra Avatar

      Pretty much clear ! Thank you for the explanation (and the kata of course !)

  • OverZealous Avatar

    Good idea for a Kata!

    One issue: Your setup code does not match the expected code: it has Games, not Game.