File size: 2,060 Bytes
7f3833a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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()