-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcomp_res_references.py
88 lines (81 loc) · 2.18 KB
/
comp_res_references.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
level_list = ["Newcomer","Bronze","Silver","Gold","Novice","PreChamp","Championship"]
style_list = ["Standard","Latin","Rhythm","Smooth"]
dance_map = {
"Latin" : {
"S" : "Samba",
"C" : "ChaCha",
"R" : "Rumba",
"J" : "Jive",
"P" : "PasoDoble"
},
"Standard" : {
"W" : "Waltz",
"T" : "Tango",
"V" : "VienneseWaltz",
"F" : "Foxtrot",
"Q" : "Quickstep",
},
"Rhythm" : {
"C" : "ChaCha",
"R" : "Rumba",
"S" : "Swing",
"M" : "Mambo",
"B" : "Bolero"
},
"Smooth" : {
"W" : "Waltz",
"T" : "Tango",
"V" : "VienneseWaltz",
"F" : "Foxtrot"
}
}
class ycnObject(object):
def __init__(self, name):
self.name = name
self.levels = Levels()
self.version = 1
def add_points(self, level, style, dance, points):
self.levels.__dict__[level].__dict__[style].__dict__[dance] += points
# setattr(getattr(getattr(getattr(self, "levels"),level),style),dance,getattr(getattr(getattr(getattr(self, "levels"),level),style),dance)+points)
class Levels(dict):
def __init__(self):
self.Newcomer = Level()
self.Bronze = Level()
self.Silver = Level()
self.Gold = Level()
self.Novice = Level()
self.PreChamp = Level()
self.Championship = Level()
class Level(dict):
def __init__(self):
self.Latin = Latin()
self.Standard = Standard()
self.Rhythm = Rhythm()
self.Smooth = Smooth()
class Latin(dict):
def __init__(self):
self.Samba = 0
self.ChaCha = 0
self.Rumba = 0
self.Jive = 0
self.PasoDoble = 0
class Standard(dict):
def __init__(self):
self.Waltz = 0
self.Tango = 0
self.VienneseWaltz = 0
self.Foxtrot = 0
self.Quickstep = 0
class Rhythm(dict):
def __init__(self):
self.ChaCha = 0
self.Rumba = 0
self.Swing = 0
self.Mambo = 0
self.Bolero = 0
class Smooth(dict):
def __init__(self):
self.Waltz = 0
self.Tango = 0
self.VienneseWaltz = 0
self.Foxtrot = 0