board.py 475 Bytes
Newer Older
Fedrico Otaran's avatar
Fedrico Otaran committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import PySimpleGUI as sg

def build(player1_name, player2_name):
    layout = [
        [sg.Text('Jugador 1: ' + player1_name, key='-P1-', text_color='darkblue')],
        [sg.Text('Jugador 2: ' + player2_name, key='-P2-', text_color='white')],
        [sg.Text('')]
    ]

    for y in range(3):
        layout += [
            [sg.Button(' ', size=(8, 4), key=f"cell-{x}-{y}") for x in range(3)]
        ]

    board = sg.Window('Ta Te Ti').Layout(layout)

    return board