diff --git a/rover/rover.py b/rover/rover.py new file mode 100644 index 0000000..9d11a8d --- /dev/null +++ b/rover/rover.py @@ -0,0 +1,9 @@ +from dataclasses import dataclass +from typing import Tuple + +Vector = Tuple[int, int] + +@dataclass +class Rover(): + pos: Vector + planet_size: Vector diff --git a/rover/test_rover.py b/rover/test_rover.py new file mode 100644 index 0000000..87fb1cc --- /dev/null +++ b/rover/test_rover.py @@ -0,0 +1,5 @@ +from rover import * + +def test_rover_constructor(): + rov = Rover(pos=(0, 0), planet_size=(100, 100)) + assert(rov.pos == (0, 0) and rov.planet_size == (100, 100))