architv / soccer-cli

:soccer: Football scores for hackers. :computer: A command line interface for all the football scores.
MIT License
1.09k stars 222 forks source link

Make bottom 3 teams red regardless of league size #10

Closed thurask closed 8 years ago

thurask commented 8 years ago

As it stands, teams 18-20 are marked in red; if the league doesn't have 20 teams (ex. Bundesliga), that's a problem.

Saturn commented 8 years ago

Also this season the French league will only be relegating the bottom 2 teams. The output should probably reflect that also.

thurask commented 8 years ago

Maybe a list of special cases to check?

Something like

elif league.CLEAGUE <= team["position"] <= league.RELEGATED

defined for each lague?

Saturn commented 8 years ago

It might be a good idea to have some kind of list of properties for each league.

This could simplify things when it comes to weird cases like French league only having two relegated teams. And every few years the UEFA coefficients can affect the number of CL spots etc. For example Italy could potentially overtake England and get an extra spot.

architv commented 8 years ago

@thurask @Saturn I have merged the branch for now. I'll be adding other properties based on #11

architv commented 8 years ago

@Saturn @thurask I've added property for each league for relegation and champions league spots. Would add EL spots too.