Create a gist now

Instantly share code, notes, and snippets.

Rover kata example for hiring
class Rover:
pass

We're going to build the API for a Mars rover using a test-driven approach. Some things that the rover could do:

* know which compass direction it is facing
* know where it is relative to its landing position
* move forward
* turn left and right
* sense whether there is an obstacle
* refuse to move forward if the path is blocked
* follow a list of single-character commands (f,l,r)
* move backward (b)
* anything else you think would be interesting
import unittest
from rover import Rover
class RoverTest(unittest.TestCase):
def testCreation(self):
self.assertIsNotNone(Rover())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment