Beta

Laser Archery

Description
Loading description...
Mathematics
Linear Algebra
Algorithms
  • Please sign in or sign up to leave a comment.
  • quackattack Avatar

    In the "Really close to target" test case I think the arrow hits inside r2 but outside r1, which is weird since r2 is supposed to be smaller than r1 (r1=1.0 r2=4.0). The reference seems to just give 0 points if it hits outside r1, even if it is inside r2.. But I suppose the test should be changed so that r2 < r1. Nice kata by the way!

  • ZED.CWT Avatar

    If an arrow somehow strikes exactly on the border of two sectors, the sector on the right takes precedence.

    What is 'right'? What if it is on the intersection of 50, 10 and 30?

    Since the behaviour is actually not tested. And different order of calculation will lead to different floating error.

    So you'd better change it to It is guaranteed arrows wont strike on border of sectors

    • phantamanta44 Avatar

      i mostly put that there because i had no guarantee that the random test wouldn't end up placing an arrow on a border. i guess one in several trillion is kind of unlikely, though.

      Suggestion marked resolved by phantamanta44 6 years ago