Please complete the story below and create a program to solve the problem. Commit any work back to the remote no later than 48 hours before the next interview.
Please use whatever languages, references and tooling you would like to complete the story.
You are an adventurer standing in the center of a map facing North, and you’re trying to weave through the terrain to your final destination. You have the directions to your destination indicating the number of steps and the direction to travel.
Adventurer Path & Instructions - ./Adventurer Path.md
Given the Path Instructions above, programmatically parse the instructions and determine what is the Euclidean (straight line) distance from your starting point to the destination in steps?
Tech Notes:
- Use whatever languages, references and tooling you would like.
- Provide any needed instructions to run program.
- Do not round to the nearest step.
- After program executes the answer should be returned.
Prerequisite: Have Java 8+ installed on the System
- Clone the repository
- Navigate to the root directory
- Run the following command:
java -jar adventurer.jar
- Clone the repository
- Navigate to the directory adventurer
- Run the following command:
javac -d bin src/main/Main.java src/main/PathHelper.java
- Navigate to the directory adventurer/bin
- Run the following command:
java Main
- Tests are located in the directory
adventurer/src/test
- The adventurer starts at the origin (0, 0) facing North.
- The adventurer turns to face the direction in which they will be moving.
- The distance can be an integer or a decimal number.
- If an invalid direction or no distance is provided, it is skipped, assuming a distance of 0.
- The directions are capital letters.