import streamlit as st from game_generator import GameGenerator # Open Markdown file & print on the screen with open("output/idea_description.md", "r") as file: readme = file.read() st.image("assets/banner4.png") st.title("SQLite RogueLike Game") st.write("Click the button below to generate a new game.") st.write("ATTENTION: Generating a new game it's a long process that takes about 5 minutes.") st.button("Generate a new game", on_click=GameGenerator.generate_game, type="primary", help="Generate a new game") st.header("Generated game") st.markdown(readme) # Open SQLite using sqlite_utils import sqlite_utils import pandas as pd import streamlit as st # Connect to the database db = sqlite_utils.Database("output/game_database.db") # Determine the tables in the database tables = db.table_names() # Create an empty dictionary to store dataframes dataframes = {} # Put the content from tables into dataframes for table in tables: # Convert the table to a pandas DataFrame dataframes[table] = pd.DataFrame(db[table].rows) # Display the table name and its DataFrame using Streamlit st.write(f"Table: {table}") st.write(dataframes[table]) def print_hi(name): # Use a breakpoint in the code line below to debug your script. print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint. # Press the green button in the gutter to run the script. if __name__ == '__main__': pass