-
Notifications
You must be signed in to change notification settings - Fork 0
/
property.py
74 lines (52 loc) · 2.06 KB
/
property.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import random
class Property:
def __init__(self,data):
self.name = data['name'] # Name of the property
self.position = data['position'] # Board position
self.owner = None # Owner of the property
self.price = data['price'] # Price of the property
self.rent = data['rent'] # Rent of the property
self.is_mortgage = False # Mortgage status
class Street(Property):
def __init__(self,data):
Property.__init__(self,data)
self.monopoly = data['monopoly']
self.build_cost = data['build_cost']
self.no_of_building = 0
self.is_hotel_built = False
self.house_rent = {}
self.house_rent[1] = data['rent_house_1']
self.house_rent[2] = data['rent_house_2']
self.house_rent[3] = data['rent_house_3']
self.house_rent[4] = data['rent_house_4']
self.rent_hotel = data['rent_hotel']
class Railboard(Property):
def __init__(self,data):
Property.__init__(self,data)
class Utility(Property):
def __init__(self,data):
Property.__init__(self,data)
################################################################################################################
class space:
def __init__(self,data):
self.name = data['name'] # Property name
self.position = data['position'] # Board position
class Tax(space):
def __init__(self,data):
space.__init__(self,data)
self.tax = data['tax']
class Chance(space):
def __init__(self,data):
space.__init__(self,data)
self.get_money = random.randint(10,50)
class Chest(space):
def __init__(self,data):
space.__init__(self,data)
self.get_money = random.randint(10,50)
class Jail(space):
def __init__(self,data):
space.__init__(self,data)
self.pay_money = 50
class Idle(space):
def __init__(self,data):
space.__init__(self,data)