📝 Commenting and formatting

This commit is contained in:
NikolajDanger
2020-07-29 10:38:37 +02:00
parent 94c6289cc1
commit ef434ecee8
12 changed files with 260 additions and 220 deletions

View File

@@ -2,6 +2,7 @@ import json
from . import draw4InARow
# Starts the game
def fourInARowStart(channel):
with open("resources/games/games.json", "r") as f:
data = json.load(f)
@@ -21,7 +22,7 @@ def fourInARowStart(channel):
else:
return "There's already a 4 in a row game going on in this channel", False
# Places a piece at the lowest available point in a specific column
def placePiece(channel : str,player : int,column : int):
with open("resources/games/games.json", "r") as f:
data = json.load(f)
@@ -51,8 +52,8 @@ def placePiece(channel : str,player : int,column : int):
return "There's no game in this channel", False
def decipherCommand(command, channel, user):
# Parses command
def parseFourInARow(command, channel, user):
if command == "" or command == " ":
return fourInARowStart(channel)
elif command.startswith(" place"):