Method `locateTarget` has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. https://codeclimate.com/github/clormor/hacker-rank-java/src/main/java/io/github/clormor/hackerrank/ai/BotSavesPrincess.java#issue_5d51a46cf17d0c0001000027