kata/rover/rover.py

23 lines
312 B
Python
Raw Normal View History

2019-11-15 20:43:59 +01:00
import enum
2019-11-15 20:29:06 +01:00
from dataclasses import dataclass
@dataclass
2019-11-15 20:34:34 +01:00
class Vector:
x: int
y: int
2019-11-15 20:43:59 +01:00
class Direction(enum.Enum):
NORTH = "N"
SOUTH = "S"
EAST = "E"
WEST = "W"
2019-11-15 20:34:34 +01:00
@dataclass
class Rover:
pos: Vector = (0, 0)
planet_size: Vector = (100, 100)
2019-11-15 20:43:59 +01:00
dir: Direction = Direction.NORTH