📝 Commenting and formatting
This commit is contained in:
@@ -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"):
|
||||
|
||||
Reference in New Issue
Block a user