Spaces:
Sleeping
Sleeping
File size: 860 Bytes
23152a0 |
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 |
import logging
# Example player data
# player_data = {
# "first_name": "Fábio",
# "second_name": "Ferreira Vieira",
# "web_name": "Fábio Vieira",
# "now_cost": 55,
# "status": "d", # Example status: 'd' means doubtful
# "total_points": 24,
# "team": 1,
# "news": "Hip injury - 75% chance of playing",
# "goals_scored": 1,
# "assists": 3,
# "clean_sheets": 1,
# "minutes": 290,
# "photo": "438098.jpg"
# }
class FPLPlayer:
# Function to map status to a human-readable format and style
def get_status_class(status):
if status == 'a':
return 'Available', 'color: green;'
elif status == 'd':
return 'Doubtful', 'color: orange;'
elif status == 'i':
return 'Injured', 'color: red;'
else:
return 'Unknown', 'color: grey;'
|