📝 You can now play against yourself

This commit is contained in:
jona605a
2020-08-11 21:57:17 +02:00
parent 5623accd47
commit f0044bcfb1
3 changed files with 16 additions and 9 deletions

View File

@@ -62,7 +62,7 @@ async def runHex(channel,command,user):
with open("resources/games/hexGames.json", "r") as f:
data = json.load(f)
winner = data[str(channel.id)]["winner"]
if winner != 0:
if winner != 0 and data[channel]["players"][0] != data[channel]["players"][1]: # player1 != player2
winnings = data[str(channel.id)]["difficulty"]*10
addMoney(data[str(channel.id)]["players"][winner-1].lower(),winnings)