This commit is contained in:
Nikolaj Danger
2020-07-31 16:50:31 +02:00
parent b52fba6a6d
commit 6934fd7480
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
import json
from . import 4InARowDraw
from . import fourInARowDraw
from funcs import logThis
# Starts the game
@ -8,7 +8,7 @@ def fourInARowStart(channel, user, opponent):
with open("resources/games/games.json", "r") as f:
data = json.load(f)
if user.lower() != opponent.lower():
if user.lower() != opponent.lower()+"schcd":
if channel not in data["4 in a row games"]:
board = [ [ 0 for i in range(7) ] for j in range(6) ]
@ -19,7 +19,7 @@ def fourInARowStart(channel, user, opponent):
with open("resources/games/games.json", "w") as f:
json.dump(data,f,indent=4)
4InARowDraw.drawImage(channel)
fourInARowDraw.drawImage(channel)
return "Started game. It's "+user+"'s turn", True, False, False
else:
@ -67,7 +67,7 @@ def placePiece(channel : str,player : int,column : int):
with open("resources/games/games.json", "w") as f:
json.dump(data,f,indent=4)
4InARowDraw.drawImage(channel)
fourInARowDraw.drawImage(channel)
return message, True, True, gameWon
else:
return "There isn't any room in that column", True, True, False