Hex DRAWING!!!! YAY!

This commit is contained in:
jona605a
2020-08-07 01:20:01 +02:00
parent b2e87ed360
commit 37b6e1c8c3
5 changed files with 114 additions and 77 deletions

View File

@ -93,11 +93,11 @@ def hexStart(channel, user, opponent):
json.dump(data,f,indent=4)
# draw the board
hexDraw.drawBoard(channel) # something something
showImage = True
hexDraw.drawBoard(channel)
gwendoTurn = True if players[0] == "Gwendolyn" else False
showImage = True
return "Started Hex game against "+getName(opponent)+ diffText+". It's "+getName(players[0])+"'s turn", showImage, False, False, gwendoTurn
else:
return "There's already a hex game going on in this channel", False, False, False, False
@ -112,7 +112,8 @@ def placeHex(channel : str,player : int,position : str):
# Places on board
board = placeOnHexBoard(board,player,position)
# Updates the drawing
hexDraw.drawHexPlacement(channel,player,position)
if isinstance(board, list):
# If the move is valid:
@ -152,7 +153,7 @@ def placeHex(channel : str,player : int,position : str):
gwendoTurn = True
# Update the board
drawHexPlacement(channel,player,position)
hexDraw.drawHexPlacement(channel,player,position)
return message, True, True, gameWon, gwendoTurn
else: