Skip to content

Instantly share code, notes, and snippets.

@tmaybe

tmaybe/README.md Secret

Last active April 17, 2017 23:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmaybe/714998ca2877119fbf568827d0e49b97 to your computer and use it in GitHub Desktop.
Save tmaybe/714998ca2877119fbf568827d0e49b97 to your computer and use it in GitHub Desktop.

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
* follow a list of single-character commands (f,l,r)
* move backward (b)
* sense whether there is an obstacle
* refuse to move forward if the path is blocked
* anything else you think would be interesting
class Rover:
pass
import unittest
from rover import Rover
class RoverTest(unittest.TestCase):
def testCreation(self):
self.assertIsNotNone(Rover())
if __name__ == '__main__':
unittest.main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment