Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -22,10 +22,15 @@ def get_word_score(word, letter_values):
|
|
22 |
|
23 |
def display_board(board):
|
24 |
"""Display the game board."""
|
|
|
|
|
25 |
for i in range(len(board)):
|
|
|
26 |
for j in range(len(board[i])):
|
27 |
-
|
28 |
-
|
|
|
|
|
29 |
|
30 |
# Create the game board
|
31 |
board = np.zeros((15, 15), dtype=int)
|
|
|
22 |
|
23 |
def display_board(board):
|
24 |
"""Display the game board."""
|
25 |
+
headers = [''] + [str(i+1) for i in range(len(board))]
|
26 |
+
data = []
|
27 |
for i in range(len(board)):
|
28 |
+
row = [chr(i+65)]
|
29 |
for j in range(len(board[i])):
|
30 |
+
row.append(chr(board[i][j]))
|
31 |
+
data.append(row)
|
32 |
+
st.table(data=data, headers=headers)
|
33 |
+
|
34 |
|
35 |
# Create the game board
|
36 |
board = np.zeros((15, 15), dtype=int)
|