-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEnums.py
More file actions
44 lines (32 loc) · 830 Bytes
/
Enums.py
File metadata and controls
44 lines (32 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
'''
* CardinalDirection.py
*
* Created on: 13.06.2017
* last modified on: 10.11.2018
* Author: Andrew Jason Bishop
*
* Some general functionalities:
* Creates an enumeration to specify the orientation
* in an cartesian coordinate system.
'''
from enum import Enum
#class Cd(Enum):
EAST = E = ( 1 + 0j)
NORTHEAST = NE = ( 1 + 1j)
NORTH = N = ( 0 + 1j)
NORTHWEST = NW = (-1 + 1j)
WEST = W = (-1 + 0j)
SOUTHWEST = SW = (-1 - 1j)
SOUTH = S = ( 0 - 1j)
SOUTHEAST = SE = ( 1 - 1j)
directions = [E, NE, N, NW, W, SW, S, SE]
#hexDirections
class CellType(Enum): # Cell states
LIVE = 2
DEAD = 4
class CellTransition(Enum): # Cell transitions
NONE = 0
EMERGENT = 1
DYING = 3
TERMINATE = 5
''' END '''