import streamlit as st # Set wide layout st.set_page_config(layout="wide", page_title="Galaxian Snake Game", initial_sidebar_state="expanded") # Sidebar instructions st.sidebar.markdown("## Galaxian Snake Game Controls") st.sidebar.markdown( """ - **Controls:** - **Q:** Move Up–Left - **W:** Move Up - **E:** Move Up–Right - **A:** Move Left - **S:** (Center) Continue current direction - **D:** Move Right - **Z:** Move Down–Left - **X:** Move Down - **C:** Move Down–Right - **Rules:** - The snake moves on a grid and grows when it eats the alien food (👾). - You must avoid colliding with the walls or yourself. - Press **R** to restart after a game over. Have fun and enjoy the retro Galaxian vibe! """ ) # p5.js snake game embedded as an HTML string html_code = r"""