rpg-szi/direction.py

15 lines
258 B
Python

from enum import Enum
class Direction(Enum):
N = 0
E = 1
S = 2
W = 3
def clockwise(self):
v = (self.value+1)%4
return Direction(v)
def counterClockwise(self):
v = (self.value-1)%4
return Direction(v)