Skip to content

Commit

Permalink
#9 removed some testing code from bot
Browse files Browse the repository at this point in the history
  • Loading branch information
UncleVasya committed Dec 20, 2016
1 parent e3f7938 commit 4bc9cd8
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions app/balancer/management/commands/dota_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,6 @@ def chat_message(channel, sender, text, msg_obj):
elif text.startswith('!start'):
self.start_command(dota)

# process test commands
elif text.startswith('!dummy_balance'):
dota.balance_answer = BalanceAnswer(
teams=[
{'players': [('Uvs', 3000)]},
{'players': []},
]
)

else:
dota.send_lobby_message('Fuck off, %s!' % sender)

client.login(credentials['login'], credentials['password'])
client.run_forever()

Expand Down Expand Up @@ -197,13 +185,6 @@ def process_game_result(bot):
print 'Game is finished!\n'
print bot.lobby

# create dummy balance result
players = Player.objects.filter(rank__gt=0)[:10]
players = [(p.name, p.ladder_mmr) for p in players]

result = BalanceResultManager.balance_teams(players)
bot.balance_answer = result.answers.first()

if bot.lobby.match_outcome == EMatchOutcome.RadVictory:
print 'Radiant won!'
MatchManager.record_balance(bot.balance_answer, 0)
Expand Down

0 comments on commit 4bc9cd8

Please sign in to comment.