-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhltv.py
70 lines (64 loc) · 2.33 KB
/
hltv.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
'''
Copyright (C) 2018 Austin Moore
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
class player:
def __init__(self):
self.name = 'Kirk'
self.kills = 0
self.deaths = 0
self.rounds = 0
self.kdr = 0.0 # Kill-Death Ratio
self.dkr = 0.0 # Death-Kill Ratio
self.kpr = 0.0 # Kills Per Round
self.dpr = 0.0 # Deaths Per Round
self.hltv_rating = 0.0
self.inv_hltv_rating = 0.0
self.url = ' '
self.stats_url = ' '
self.negative = 0.0 # Either dkr, dpr, or inv_hltv_rating
self.positive = 0.0 # Either kdr, kpr, or hltv_rating
self.lower_negative_range = 0.0
self.upper_negative_range = 0.0
self.lower_positive_range = 0.0
self.upper_positive_range = 0.0
self.alive = True
class team:
def __init__(self):
self.win_percentage = [0.0, 0.0, 0.0]
self.lost_percentage = [0.0, 0.0, 0.0]
self.won_matches = 0
self.lost_matches = 0
self.won_trials = 0
self.lost_trials = 0
self.won_rounds = 0
self.lost_rounds = 0
self.wins = 0
self.losses = 0
self.name = 'A-Team'
self.player_count = 5
self.players = [player() for i in range(self.player_count)]
self.url = ' '
self.total_negative = 0.0 # The addition of all negative on ONE team
self.alive = True
class game:
def __init__(self):
self.match_score = ['0-0', '0-0', '0-0']
self.tie_percentage = [0.0, 0.0, 0.0]
self.ties = 0
self.bestof = 1
self.rounds = 30
self.team_count = 2
self.teams = [team() for i in range(self.team_count)]
self.score = ['0-0']
self.score_index = 0
self.data = ''