-
Notifications
You must be signed in to change notification settings - Fork 0
/
cards.py
44 lines (29 loc) · 1.06 KB
/
cards.py
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
# -*- coding: utf-8 -*-
from const import _Const
#######################################################
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# Gokberk Gulgun #
# Psychic Poker #
# #
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#######################################################
CONST = _Const()
"""
Definition Of Cards Class
"""
class Cards(object) :
"""
init function
binding card values into numbers
"""
def __init__(self, card_value, card_type) :
self.card_value = card_value
self.card_type = str(card_type).upper()
self.string_card_value = card_value
self.numerical_card_value = (CONST.card_values.get(self.card_value) or int(self.card_value))
def getCardValue(self):
return self.numerical_card_value
def getStringCardValue(self):
return self.card_value
def getCardType(self):
return self.card_type