import streamlit as st import random import time st.set_page_config(page_title="Match Setup", layout="centered") st.title("๐Ÿ Match Setup") teams = ["India", "Australia", "England", "South Africa", "New Zealand"] your_team = st.selectbox("๐ŸŽฝ Select Your Team", teams) opponent = st.selectbox("๐Ÿงข Select Opponent", [team for team in teams if team != your_team]) overs = st.slider("โณ Select Number of Overs", 1, 10, 5) pitch = st.radio("๐Ÿงฑ Pitch Type", ["Flat", "Green", "Dusty"]) weather = st.radio("๐ŸŒค๏ธ Weather Conditions", ["Sunny", "Cloudy", "Rainy"]) stadiums = ["Wankhede - Mumbai", "MCG - Melbourne", "Lords - London", "Newlands - Cape Town"] stadium = st.selectbox("๐ŸŸ๏ธ Select Stadium", stadiums) bowling_type = st.radio("๐ŸŽฏ Your Bowling Style", ["Fast", "Medium", "Spin"]) batting_first = st.radio("๐Ÿง‘โ€๐Ÿš€ Who Bats First?", [your_team, opponent]) st.markdown("---") with st.expander("๐ŸŽž๏ธ Preview Match Vibes (Animation Ready)"): st.info("โšก Animation Placeholder for a dynamic cricket intro (e.g., stadium flyover)") st.markdown("## ๐Ÿงพ Match Summary") st.markdown(f""" - ๐Ÿ Teams: **{your_team}** vs **{opponent}** - ๐Ÿ• Overs: **{overs}** - ๐Ÿงฑ Pitch: **{pitch}** - ๐ŸŒค๏ธ Weather: **{weather}** - ๐ŸŸ๏ธ Stadium: **{stadium}** - ๐ŸŽฏ Bowling Style: **{bowling_type}** - ๐Ÿง‘โ€๐Ÿš€ Batting First: **{batting_first}** """) if st.button("โœ… Confirm Match Setup"): with st.spinner("Locking it in..."): time.sleep(1.5) st.session_state["match_ready"] = True st.session_state["your_team"] = your_team st.session_state["opponent"] = opponent st.session_state["overs"] = overs st.session_state["pitch"] = pitch st.session_state["weather"] = weather st.session_state["stadium"] = stadium st.session_state["bowling_type"] = bowling_type st.session_state["batting_first"] = batting_first st.success("๐Ÿš€ Match is ready! Go to **Live Match** to begin.") st.balloons()