BeniVF / marsrover-hs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

marsrover

Haskell implementation of Mars rover kata.

This project has been created using the following:

 > stack new marsrover hspec 

Requirements

These are the requirements that has been implemented:

  • You are given the initial starting point (x,y) of a rover and the direction (N,S,E,W) it is facing.
  • The rover receives a character array of commands.
  • Implement commands that move the rover forward/backward (f,b).
  • Implement commands that turn the rover left/right (l,r).

Test

Change code and run test:

  > stack ghci --ghci-options -isrc --ghci-options -itest marsrover:marsrover-test

Run all the tests using:

  > stack test

Run

Run the project

  > stack run
  S 8 4 LFFFRRRFLLLL LFBR<EOL+Ctrl+D>

About

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Haskell 100.0%