Coder Social home page Coder Social logo

code-challenge-nasa-rover's Introduction

code-challenge-nasa-rover

This is just a simple java exercise:

  • mars rovers need to be navigated by textfiles.
  • The world is represented as grid with x,y coords.
  • Terms to use are N = north, E = north, S = south, W = west, L = turn left, R = turn right, M = move one field in grid.

The requirements are:

  • The application must run
  • There must be a way to supply the application with the input data via text file
  • evidence that the solution is complete by, as a minimum, indicating that it works correctly against the supplied test data
  • Implement the application in a production ready manner
  • Use no other framework as a native language. You might use 1 framework for testing.

You can build the solution by:

gradlew assemble

And then run it by for example:

java -jar build\libs\rover-cli-1.0-SNAPSHOT.jar
java -jar build\libs\rover-cli-1.0-SNAPSHOT.jar -help
java -jar build\libs\rover-cli-1.0-SNAPSHOT.jar .\src\test\resources\TestInput_valid_1
java -jar build\libs\rover-cli-1.0-SNAPSHOT.jar .\src\test\resources\TestInput_fail_collision_r1_into_r2
....

this would lead to outputs like this:

java -jar build\libs\rover-cli-1.0-SNAPSHOT.jar
Usage: java -jar RoverCli.jar , more details by java -jar RoverCli.jar -help

java -jar build\libs\rover-cli-1.0-SNAPSHOT.jar -help
Usage: java -jar RoverCli.jar 
File format:
..........

java -jar build\libs\rover-cli-1.0-SNAPSHOT.jar .\src\test\resources\TestInput_valid_1
rover end positions:
Rover 1 position:1 3 N
Rover 2 position:5 1 E

java -jar build\libs\rover-cli-1.0-SNAPSHOT.jar .\src\test\resources\TestInput_fail_collision_r1_into_r2
your data is not valid (Rover 1 collision with Rover 2 at (3,3)).
Your input file in correct, but the execution of the movements would lead to possible damage.

unit tests (see src/test/java) can be run and reports generated by:

gradlew test jacocoTestReport

report:

  • html test report can be found under build\reports\tests\test\index.html
  • code coverage report at build\reports\jacoco\test\html\index.html

code-challenge-nasa-rover's People

Contributors

michaelgruczel avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.