Hexdraw almost done

This commit is contained in:
jona605a
2020-08-06 20:45:07 +02:00
parent 89df136c8d
commit af276e268b
3 changed files with 71 additions and 80 deletions

View File

@ -93,16 +93,12 @@ def hexStart(channel, user, opponent):
json.dump(data,f,indent=4)
# draw the board
#fourInARowDraw.drawImage(channel)
# hexDraw() # something something
hexDraw.drawBoard(channel) # something something
showImage = True
gwendoTurn = False
if players[0] == "Gwendolyn":
# in case she has the first move
gwendoTurn = True
return "Started game against "+getName(opponent)+ diffText+". It's "+getName(players[0])+"'s turn", True, False, False, gwendoTurn
gwendoTurn = True if players[0] == "Gwendolyn" else False
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
@ -157,7 +153,7 @@ def placeHex(channel : str,player : int,position : str):
# Update the board
drawHexPlacement(channel,player,position)
return message, True, True, gameWon, gwendoTurn
else:
# Invalid move. "board" is the error message