Giter Club home page Giter Club logo

marsrover's Introduction

Necessary prereqs

Java:

java -version
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b15, mixed mode)

Scala:

scala -version
Scala code runner version 2.12.0 -- Copyright 2002-2016, LAMP/EPFL and Lightbend, Inc.

Compiling the program

I used intellij during my development, but I tested using the scala compiler from the command line directly and it works as well

cd marsrover
mkdir out
scalac src/marsrover.scala src/models.scala src/parsing.scala src/test/test_marsrover.scala -d out/

Running the tests

scala -cp out/ Test <test input files dir> <test output files dir>

Example run of tests

scala -cp out/ Test src/test/inputs/ src/test/outputs

Checking if C:\hg\scala_projects\marsrover\src\test\inputs\all_left.txt is equivalent to C:\hg\scala_projects\marsrover\src\test\outputs\all_left.txt
0 0 N

0 0 N

Checking if C:\hg\scala_projects\marsrover\src\test\inputs\edges.txt is equivalent to C:\hg\scala_projects\marsrover\src\test\outputs\edges.txt
10 10 E
10 10 N

10 10 E
10 10 N

Checking if C:\hg\scala_projects\marsrover\src\test\inputs\example.txt is equivalent to C:\hg\scala_projects\marsrover\src\test\outputs\example.txt
1 3 N
5 1 E

1 3 N
5 1 E

All good!

Running the program

scala -cp out/ Main <your sample file to input> <optional sample file to output; if not present will print to stdout>

Example run

scala -cp out/ Main src/test/inputs/example.txt
1 3 N
5 1 E

marsrover's People

Stargazers

Grant Nicholas avatar

Watchers

Grant Nicholas 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.