import streamlit as st from streamlit.components.v1 import html # Set Streamlit to wide mode st.set_page_config(layout="wide", page_title="Galaxian Snake 3D") # Define the enhanced HTML content with Three.js game_html = """ Galaxian Snake 3D
Score: 0 | Time: 0s
Lives: 3
""" # Streamlit app with sidebar with st.sidebar: st.title("Galaxian Snake 3D") st.write("**Controls:**") st.write("- WASD or Arrow Keys to move") st.write("- R to reset after game over") st.write("**Objective:**") st.write("- Eat alien food (pink dodecahedrons) to grow") st.write("- Avoid L-system creatures (blue structures)") st.write("- Watch creatures exchange quine messages") # Render the HTML game html(game_html, height=800, width=2000, scrolling=False) st.write("Note: Requires internet for Three.js to load.")