Ad
  • Custom User Avatar

    @fstnando77

    From Kata description:

    Sometimes a line may be valid in one direction but not the other. Such a line is still considered valid.

  • Custom User Avatar

    I agree with amitznati. In the following case (Good5):

       +-------+          
       |      +++---+     
    X--+      +-+   X 
    

    You are also not 100% sure which path to take, however return true.

  • Custom User Avatar

    Did you read the hint in the Kata description?

    Imagine yourself walking a path where you can only see your very next step. Can you know which step you must take, or not?

    If you are not 100% sure which step you must take then line is not valid.

  • Custom User Avatar

    It must be possible to follow the line with no ambiguity

    • e.g. When starting from bottom-right X you will get to a junction. Do you turn left or right? You don't know...
    • e.g. Similar can happen when starting at the left-side X

    Since the line is not "valid" in either direction then it is not considered a valid line.