summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-11-12Rename base class screen module base_screen to make pylint happyOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-11-12Move colors in an enum in Color moduleOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-11-12Move playfield outside the Player classOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-11-12Remove trailing newlines and add blank lines were neededOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-11-12Update name of screen modules according to PEP8Olivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-11-12Add some documentation to the cameltris.piece moduleOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-11-12Place main code into main function and document itOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-11-12Rename the package cameltris and provide __main__.pyOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-11-12Expect pygame.surface.Surface rather than pygame.Surface for screenOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-11-08Add type hints for screen packageOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-11-08Use a nested function instead of a lambda to exitOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-11-08Make controller classes and screen classes inherit from abstract classesOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-11-05Do not use parenthesis when defining a class without inheritanceOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-03-13Allow to pause the gameOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-03-13Add setup.py and requirementsOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-02-26Move piece-related stuff in a dedicated unitOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-02-13Implement the top outOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-02-13Rename stick piece lock pieceOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-29Take the starting level into considerationOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-29Remove unused importsOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-24Pretend we can have multiple players nowOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-24Cleanly handle the inputsOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-24Have most functions in a player objectOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-24Get rid of duplicated classOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-23Abstract the controllerOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-23Use argument parsingOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-22Fix rotation of T pieceOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-22Implement use of joystickOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-22Display the level numberOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-22Use a different color for the JOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-22Implement pressing down correctlyOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-22Implement DAS mechanismOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-22Show the scoreOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-22Show the score in the terminalOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-22Associate the level to the fall speedOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-22Use HSL colorsOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-22Inherit the colorsOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-22implement default rotation mechanism and add L and J piecesOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-22Run the game at 60 FPSOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-22Show the next pieceOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-21Drop pieces automatically and enable keyboard repeatOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-21Burn rowsOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-21Fix intentional use of negative indexingOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-21Add piece generation and stickOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-21Handle collisionsOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-21Fix initial positionOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-21Add the T pieceOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-21Have a few pieces implementedOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-21Allow to move a piece on the screenOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-12-21Allow to display pieces on the gridOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>