This commit is contained in:
NikolajDanger
2020-08-04 19:23:00 +02:00
parent 0739d9e3ca
commit 3de16508cc
3 changed files with 3 additions and 4 deletions

View File

@ -102,7 +102,7 @@ def placePiece(channel : str,player : int,column : int):
data["4 in a row games"][channel]["win coordinates"] = winCoordinates
message = getName(data["4 in a row games"][channel]["players"][won-1])+" won."
winAmount = int(data["4 in a row games"][channel]["difficulty"])^2+5
winAmount = int(data["4 in a row games"][channel]["difficulty"])**2+5
if data["4 in a row games"][channel]["players"][won-1] != "Gwendolyn":
message += " Adding "+str(winAmount)+" GwendoBucks to their account."
elif 0 not in board[0]:

View File

@ -365,7 +365,6 @@ def getName(userID):
data = json.load(f)
if userID in data:
logThis("yeet")
return data[userID]["user name"]
else:
logThis("Couldn't find user")

View File

@ -136,8 +136,8 @@ async def fiar(channel,command,user):
logThis("The old image was already deleted")
winner = data["4 in a row games"][str(channel)]["winner"]
reward = int(data["4 in a row games"][str(channel)]["difficulty"])
reward = reward^2 + 5
difficulty = int(data["4 in a row games"][str(channel)]["difficulty"])
reward = difficulty**2 + 5
if winner != 0:
if data["4 in a row games"][str(channel)]["players"][winner-1].lower() != "gwendolyn":
addMoney(data["4 in a row games"][str(channel)]["players"][winner-1].lower(),reward)