pyeuromil.euromil_play module¶
Euromy_play: stores Euromillions plays and give summary of wins
-
class
pyeuromil.euromil_play.
Grid
(numbers, stars, star_plus=False)¶ Bases:
object
contains a grid played at an Euromillions game
-
static
check_numbers
(numbers, stars)¶ check if parameters for the grid are corrects
Parameters: - numbers (list of int) – The list of numbers played
- stars (list of int) – The list of stars played
Returns: check status and error message is status is ko
Return type: bool, string
-
evaluate_grid
(result)¶ returns the list of numbers and stars both in a Grid and a result
Parameters: result (EuroResult) – The result we want to check the grid against Returns: the list of the numbers in the grid and the result and the list of the stars in the grid and the result Return type: list of int, list of int
-
static
-
class
pyeuromil.euromil_play.
Plays
¶ Bases:
object
Stores plays and is used to validate if plays are wins or looses
-
append
(grid, *, start=None, end=None, tuesday=False, friday=False)¶ Adds a new grid and dates of play to Plays
Parameters: - grid – The grid played
- start_date (date) – start date
- end_date (date) – end_date
- tuesday (date) – Indicates in the grid is played on tuedays
- friday (date) – Indicates in the grid is played on fridays
Raises: ValueError
-
static
play_summary
(play, only_wins=False)¶ returns the summary of numbers and win rankings for a play (ensemble of games)
Parameters: - play (play) – The play the summary will be based upon
- only_wins (bool) – show only winning games in summary
Returns: dictionary with date, numbers, stars, ranking and ranking_star_plus keys
Return type: dict
-
static
ranking
(numbers, stars)¶ returns ranking for a normal game and ranking for a Star Plus game Ranking is 0 if nothing was won
Parameters: - numbers (list of int) – The list of numbers played
- stars (list of int) – The list of stars played
Returns: normal ranking and Star Plus ranking
Return type: int, int
Raises: ValueError
-