Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
-
import pandas as pd
|
| 3 |
|
| 4 |
#Globals
|
| 5 |
legal_numbers = [1,2,3,4,5,6,7,8,9]
|
|
@@ -7,9 +6,14 @@ col1, col2, col3 = st.columns(3)
|
|
| 7 |
col4, col5, col6 = st.columns(3)
|
| 8 |
col7, col8, col9 = st.columns(3)
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
def get_userInput():
|
| 11 |
input = st.text_input("Enter a number between 1 to 9: ", key="input")
|
| 12 |
-
st.text("Legal Numbers: " + "".join(str(legal_numbers)))
|
| 13 |
return input
|
| 14 |
|
| 15 |
def validate_userInput(user_input):
|
|
@@ -43,11 +47,7 @@ def reset_legalNumbers():
|
|
| 43 |
|
| 44 |
#def update_legalNumbers():
|
| 45 |
|
| 46 |
-
|
| 47 |
-
#UIApp starts here
|
| 48 |
-
st.set_page_config(page_title="Python - Tic Tac Toe", page_icon=":python:")
|
| 49 |
-
st.header("Python - Tic Tac Toe")
|
| 50 |
-
|
| 51 |
user_input=get_userInput()
|
| 52 |
display_board()
|
| 53 |
|
|
|
|
| 1 |
import streamlit as st
|
|
|
|
| 2 |
|
| 3 |
#Globals
|
| 4 |
legal_numbers = [1,2,3,4,5,6,7,8,9]
|
|
|
|
| 6 |
col4, col5, col6 = st.columns(3)
|
| 7 |
col7, col8, col9 = st.columns(3)
|
| 8 |
|
| 9 |
+
#UIApp starts here
|
| 10 |
+
def set_page_config():
|
| 11 |
+
st.set_page_config(page_title="Python - Tic Tac Toe", page_icon=":python:")
|
| 12 |
+
st.header("Python - Tic Tac Toe")
|
| 13 |
+
st.text("Legal Numbers: " + "".join(str(legal_numbers)))
|
| 14 |
+
|
| 15 |
def get_userInput():
|
| 16 |
input = st.text_input("Enter a number between 1 to 9: ", key="input")
|
|
|
|
| 17 |
return input
|
| 18 |
|
| 19 |
def validate_userInput(user_input):
|
|
|
|
| 47 |
|
| 48 |
#def update_legalNumbers():
|
| 49 |
|
| 50 |
+
set_page_config()
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
user_input=get_userInput()
|
| 52 |
display_board()
|
| 53 |
|