Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
|
| 3 |
#Globals
|
| 4 |
-
legal_numbers = [1,2,3,4,5,6,7,8,9]
|
| 5 |
|
| 6 |
def get_userInput():
|
| 7 |
input = st.text_input("Enter a number between 1 to 9: ", key="input")
|
|
@@ -59,6 +59,11 @@ st.header("Python - Tic Tac Toe")
|
|
| 59 |
user_input=get_userInput()
|
| 60 |
display_board(True)
|
| 61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
#UI Buttons
|
| 63 |
submit=st.button('Submit')
|
| 64 |
replay=st.button('Replay')
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
|
| 3 |
#Globals
|
| 4 |
+
#legal_numbers = [1,2,3,4,5,6,7,8,9]
|
| 5 |
|
| 6 |
def get_userInput():
|
| 7 |
input = st.text_input("Enter a number between 1 to 9: ", key="input")
|
|
|
|
| 59 |
user_input=get_userInput()
|
| 60 |
display_board(True)
|
| 61 |
|
| 62 |
+
firstRun=True
|
| 63 |
+
if firstRun:
|
| 64 |
+
reset_legalNumbers()
|
| 65 |
+
firstRun=False
|
| 66 |
+
|
| 67 |
#UI Buttons
|
| 68 |
submit=st.button('Submit')
|
| 69 |
replay=st.button('Replay')
|