day02 package
Subpackages
Submodules
day02.day2 module
day2 solution.
- class day02.day2.Color(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
StrEnum
Color enum.
- BLUE = 'blue'
- GREEN = 'green'
- RED = 'red'
- class day02.day2.Draw(string: str)[source]
Bases:
object
Class representing a draw from the bag.
- blue: int = 0
- green: int = 0
- red: int = 0
- class day02.day2.Game(string: str)[source]
Bases:
object
Game class, showing multiple draws.
- blue: int = 0
- green: int = 0
- id: int
- red: int = 0
- day02.day2.game_filter(game: Game) bool [source]
Returns true if the game satisfies the constraints of Question 1.
- day02.day2.get_games(input_file: str) list[Game] [source]
Gets the games from the input file.
- Parameters:
input_file (str) – input file name
- Returns:
list of Games
- Return type:
list[Game]
Module contents
day02 implementation.