Code Monkey home page Code Monkey logo

mars-helicopter-kata's Introduction

Mars Helicopter Challenge

You’re part of the team that explores Mars by sending remotely controlled helicopters to the surface of the planet. Develop an API that translates the commands sent from earth to instructions that are understood by the helicopter.

Requirements

You are given a helicopter that has an initial starting point The helicopter receives one instruction at a time as a single character ('f', 'b', 'l' or 'r') When the helicopter moves, it's position is updated, you can read the new coordinates from

Pseudo Code:

#### Object Oriented:   

helicopter = Helicopter(x=0, y=0)
helicopter.move('f')
assert helicopter.y == 1
assert helicopter.x == 0

Functional:

assert move_helicopter(starting_point=Position(0,0), move='f') == Position(0, 1)

Rules

Write your tests first! No red phases while refactoring.

New Requirements

Multiple commands: Transmission of data from Earth to Mars is kinda slow, so we'd like to be able to send batches of commands.

Error Handling: Data transmissions over the deep space network sometimes introduce errors, so be prepared to handle invalid commands, starting positions, and so on.

Spherical Planet: As it turns out, Mars is (roughly) spherical, and if you go far enough in one direction, you get back to where you started. The first line of the input now contains the size of the grid.

Turning and moving: This helicopter has a fixed forward facing camera, so it turns out that it's important that it be able to turn. The input now includes the direction (N, S, E, W) the helicopter is facing in addition to it's starting position. Commands can now include L and R, for turn left and right 90° respectively. The other commands are now relative to the direction the helicopter is facing.

Original Problem

https://code.google.com/archive/p/marsrovertechchallenge/

mars-helicopter-kata's People

Contributors

shreyaa12 avatar mch avatar

Watchers

 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.