.. _f-dice: module ``td_2a.dice`` ===================== .. inheritance-diagram:: ensae_teaching_cs.td_2a.dice Short summary +++++++++++++ module ``ensae_teaching_cs.td_2a.dice`` Quelques problèmes de `Google Jam `_. :githublink:`%|py|8` Classes +++++++ +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | class | truncated documentation | +===================================================================+===========================================================================================================================================+ | :class:`DiceStraight ` | Inspired by `Problem A. Dice Straight `_. ... | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ Static Methods ++++++++++++++ +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | staticmethod | truncated documentation | +===============================================================================================+=========================================================================+ | :meth:`max_number_sequences ` | Returns the maximum number of sequences given the number of dices. | +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ | :meth:`parse ` | Reads the content of a problem Returns a list of :class:`DiceStraight`. | +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+ Methods +++++++ +---------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ | method | truncated documentation | +=========================================================================================================+==============================================================================================================================+ | :py:meth:`__init__ ` | Dices = list of 6-uples | +---------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__len__ ` | Retourne le nombre de dés. | +---------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__str__ ` | Displays dices. | +---------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ | :meth:`longest_straight_sequence ` | Returns one of the longest sequence of consecutive integers. It returns a list of tuple (face, dice). The implementation ... | +---------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: ensae_teaching_cs.td_2a.dice :members: :special-members: __init__ :show-inheritance: