Update app.py
Browse files
app.py
CHANGED
@@ -64,17 +64,21 @@ def main():
|
|
64 |
col1, col2, col3 = st.columns(3)
|
65 |
with col1:
|
66 |
if st.button("West"):
|
67 |
-
|
68 |
with col2:
|
69 |
if st.button("North"):
|
70 |
-
|
71 |
if st.button("Stop"):
|
72 |
-
|
73 |
if st.button("South"):
|
74 |
-
|
75 |
with col3:
|
76 |
if st.button("East"):
|
77 |
-
|
|
|
|
|
|
|
|
|
78 |
|
79 |
if __name__ == "__main__":
|
80 |
main()
|
|
|
64 |
col1, col2, col3 = st.columns(3)
|
65 |
with col1:
|
66 |
if st.button("West"):
|
67 |
+
direction = "West"
|
68 |
with col2:
|
69 |
if st.button("North"):
|
70 |
+
direction = "North"
|
71 |
if st.button("Stop"):
|
72 |
+
direction = "None"
|
73 |
if st.button("South"):
|
74 |
+
direction = "South"
|
75 |
with col3:
|
76 |
if st.button("East"):
|
77 |
+
direction = "East"
|
78 |
+
|
79 |
+
if direction != "None":
|
80 |
+
st.session_state.locations = move_emojis(st.session_state.locations, current_location, direction)
|
81 |
+
st.experimental_rerun()
|
82 |
|
83 |
if __name__ == "__main__":
|
84 |
main()
|