Giter Club home page Giter Club logo

mars_eva_kata's Introduction

πŸ‘‹ ARRANGE

My Name:

  • πŸ‘©πŸΌβ€πŸš€ Estela Medrano.

One curiosity:

  • I love πŸ€–.

My Social Networks:

  • Linkedin | estela-medrano-jimΓ©nez-52563776: go...

  • GitHub | @divae: go..

  • Twitter | @EstelaYoMisma: go..

  • Blog | enfamilialohacemosmejor go..

🦾 ACT

Mars Eva Kata

  • πŸ’Ž Ruby and RSpec with Bundle.
  • 🎯 I will use some of the requeriments of Kata-log Website (go)

The world

            ------------------------------------
            -2, 2 | -1, 2 | 0, 2 |  1, 2 |  2, 2 
-+          ------------------------------------      ++
            -2, 1 | -1, 1 | 0, 1 |  1, 1 |  2, 2
            ------------------------------------
            -2, 0 | -1, 0 | 0, 0 |  1, 0 |  2, 0 
            ------------------------------------
            -2,-1 | -1,-1 | 0,-1 |  1,-1 |  2,-2
--          ------------------------------------      +-
            -2,-2 | -1,-2 | 0,-2 |  1,-2 |  2,-2 

Task

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

Requirements

  • πŸ•ΉοΈ Given the initial starting point (0,0) of a Eva and the direction (N) it is facing.
  • πŸ“‘ Eva receives a character array of commands(f,b,r,l).
  • πŸ‘†πŸ‘‡ Implement commands that move Eva forward/backward.
  • πŸ‘ˆπŸ‘‰ Implement commands that turn Eva left/right.
  • 🌎 Implement wrapping from one edge of grid to another. (planets are spheres after all)
  • πŸ”ƒ Implement changes of direction('N', 'S', 'E', 'W')

πŸ’ƒ ASSERT

The Strategy is that in the world there can only be one robot that can move in all directions.

Class Game

  • The class game generates the robot at the point and checks that everything is well integrated in the tests.

Class Robot

  • The first time it lands at point 0.0 of the plane heading north.
  • Knows how to move around the plane using position and direction vectors.
  • Knows how to move around the plane using position and direction vectors.

Class Vector

  • It is the class in charge of changing the position of the robot using the point and direction classes to generate the new coordinatee.
  • It tells the robot where it is and in which direction.

Class Point

  • Coordinate axis handler.

Classes East. North, South, West

  • Knows how the axes are modified with direction in mind.

Running Tests

$ rspec

Next Steps

  • Change method "change" in Vector classes, I think it would be good to apply the command pattern to simplify that code and make it clearer.
  • An interface for the address classes would ensure that they all have the same methods.

mars_eva_kata's People

Contributors

divae avatar

Watchers

 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.