summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2019-05-20 23:59:46 +0200
committeremkael <emkael@tlen.pl>2019-05-20 23:59:46 +0200
commit1b7ac788ad9499461b679753236e5ab598da7aec (patch)
treebee166b4a7e281496bfb1b7501f8c6b82fbdc5f0
parent8bf8380af6db557420595128816d23212ebfe7f7 (diff)
DTO for deal conversion
-rw-r--r--dealconvert/dto.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/dealconvert/dto.py b/dealconvert/dto.py
new file mode 100644
index 0000000..e51f052
--- /dev/null
+++ b/dealconvert/dto.py
@@ -0,0 +1,22 @@
+POSITION_NORTH = 0
+POSITION_EAST = 1
+POSITION_SOUTH = 2
+POSITION_WEST = 3
+SUIT_SPADES = 0
+SUIT_HEARTS = 1
+SUIT_DIAMONDS = 2
+SUIT_CLUBS = 3
+
+class Deal(object):
+ event = ''
+ number = None
+ vulnerable = None
+ dealer = None
+ hands = None
+
+ def __init__(self):
+ self.hands = [[[],[],[],[]],
+ [[],[],[],[]],
+ [[],[],[],[]],
+ [[],[],[],[]]]
+ self.vulnerable = {'NS': False, 'EW': False}