Files
Gwendolyn/funcs/games/hexDraw.py
2020-08-04 23:28:05 +02:00

26 lines
553 B
Python

import json
import math
from PIL import Image, ImageDraw, ImageFont
from funcs import logThis, getName
def hexDraw(channel):
logThis("Drawing Hex board")
with open("resources/games/hexGames.json", "r") as f:
data = json.load(f)
board = data[channel]["board"]
players = data[channel]["players"]
if players[0] == "Gwendolyn":
player1 = "Gwendolyn"
else:
player1 = getName(players[0])
if players[1] == "Gwendolyn":
player2 = "Gwendolyn"
else:
player2 = getName(players[1])