awacke1 commited on
Commit
198b6be
·
1 Parent(s): 91a5ba3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -10
app.py CHANGED
@@ -67,17 +67,30 @@ def boggle(size, time_limit):
67
  start_time = time.time()
68
  form_id = 0
69
 
70
- while time.time() - start_time < time_limit:
71
- with st.form(key=f"new_word_{form_id}"):
72
- new_word = st.text_input("Enter a new word:")
73
- if len(new_word) >= 3 and new_word not in words and validate_word(new_word.upper(), board):
74
- words.add(new_word)
75
- st.write(f"Added {new_word} to the list of words!")
76
- st.form_submit_button(label='Submit')
77
- form_id += 1
78
- st.write("Time's up! Here are your words:")
 
 
 
79
  st.write(words)
80
 
81
-
 
 
 
 
 
 
 
 
 
 
82
  if __name__ == "__main__":
83
  boggle(7, 60)
 
67
  start_time = time.time()
68
  form_id = 0
69
 
70
+ with st.form(key=f"new_word_{form_id}"):
71
+ new_word = st.text_input("Enter a new word:")
72
+ if len(new_word) >= 3 and new_word not in words and validate_word(new_word.upper(), board):
73
+ words.add(new_word)
74
+ st.write(f"Added {new_word} to the list of words!")
75
+ st.form_submit_button(label='Submit')
76
+ form_id += 1
77
+
78
+ #while time.time() - start_time < time_limit:
79
+ # st.markdown(""".
80
+ # """)
81
+ st.write("Here are your words:")
82
  st.write(words)
83
 
84
+ # while time.time() - start_time < time_limit:
85
+ # with st.form(key=f"new_word_{form_id}"):
86
+ # new_word = st.text_input("Enter a new word:")
87
+ # if len(new_word) >= 3 and new_word not in words and validate_word(new_word.upper(), board):
88
+ # words.add(new_word)
89
+ # st.write(f"Added {new_word} to the list of words!")
90
+ # st.form_submit_button(label='Submit')
91
+ # form_id += 1
92
+ #st.write("Time's up! Here are your words:")
93
+ #st.write(words)
94
+
95
  if __name__ == "__main__":
96
  boggle(7, 60)