moonboard module
- class moonboard.MoonBoard(year_layout: int, image: str, rows: int = 18, cols: int = 11)
Bases:
objectClass that encapsulates Moonboard layout info for a specific year.
- Parameters
year_layout (int) – Year in which this board layout was published
image (str) – Path to the image file for this board layout
rows (int, optional) – Number of rows of the board. Defaults to 18
cols (int, optional) – Number of columns of the board. Defaults to 11
- get_cols() int
Get number of columns of the board
- Returns
Number of columns of the board
- Return type
int
- get_image() str
Get the path to the image file for this board layout
- Returns
Image path
- Return type
str
- get_rows() int
Get number of rows of the board
- Returns
Number of rows of the board
- Return type
int
- get_year_layout() int
Get the year in which this board layout was published
- Returns
Year in which this board layout was published
- Return type
int
- moonboard.get_moonboard(year: int) moonboard.MoonBoard
Factory function. Given a year, return a Moonboard object encapsulating the Moonboard layout info of that year.
- Parameters
year (int) – Year of the desired Moonboard layout
- Returns
Moonboard object encapsulating the Moonboard layout info
- Return type
- Raises
ValueError – Year is not a valid Moonboard year