Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -717,14 +717,14 @@ def main():
|
|
717 |
for loc, (lat, lon) in PRAIRIE_LOCATIONS.items():
|
718 |
folium.Marker([lat, lon], popup=loc).add_to(prairie_map)
|
719 |
game_state = load_game_state(st.session_state.game_state_timestamp)
|
720 |
-
for player in game_state["players"].
|
721 |
folium.CircleMarker(
|
722 |
location=[44.0 + player["x"] * 0.01, -103.0 + player["z"] * 0.01],
|
723 |
radius=5,
|
724 |
color=f"#{player['color']:06x}",
|
725 |
fill=True,
|
726 |
fill_opacity=0.7,
|
727 |
-
popup=f"{
|
728 |
).add_to(prairie_map)
|
729 |
for client_id, player in st.session_state.prairie_players.items():
|
730 |
folium.CircleMarker(
|
|
|
717 |
for loc, (lat, lon) in PRAIRIE_LOCATIONS.items():
|
718 |
folium.Marker([lat, lon], popup=loc).add_to(prairie_map)
|
719 |
game_state = load_game_state(st.session_state.game_state_timestamp)
|
720 |
+
for username, player in game_state["players"].items(): # Use .items() to get username and data
|
721 |
folium.CircleMarker(
|
722 |
location=[44.0 + player["x"] * 0.01, -103.0 + player["z"] * 0.01],
|
723 |
radius=5,
|
724 |
color=f"#{player['color']:06x}",
|
725 |
fill=True,
|
726 |
fill_opacity=0.7,
|
727 |
+
popup=f"{username} (Score: {player['score']}, Treasures: {player['treasures']})"
|
728 |
).add_to(prairie_map)
|
729 |
for client_id, player in st.session_state.prairie_players.items():
|
730 |
folium.CircleMarker(
|