diff --git a/rover/rover.py b/rover/rover.py index 577d4d3..af8a8a6 100644 --- a/rover/rover.py +++ b/rover/rover.py @@ -9,5 +9,5 @@ class Vector: @dataclass class Rover: - pos: Vector - planet_size: Vector + pos: Vector = (0, 0) + planet_size: Vector = (100, 100) diff --git a/rover/test_rover.py b/rover/test_rover.py index b0b0c00..cb0b328 100644 --- a/rover/test_rover.py +++ b/rover/test_rover.py @@ -4,3 +4,8 @@ from rover import Rover def test_rover_constructor(): rov = Rover(pos=(0, 0), planet_size=(100, 100)) assert rov.pos == (0, 0) and rov.planet_size == (100, 100) + + +def test_rover_default_values(): + rov = Rover() + assert rov.pos == (0, 0) and rov.planet_size == (100, 100)