diff options
-rw-r--r-- | cameltris/piece.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cameltris/piece.py b/cameltris/piece.py index 2f3e7ce..1bbe2c4 100644 --- a/cameltris/piece.py +++ b/cameltris/piece.py @@ -1,3 +1,5 @@ +""" Module that defines all types of pieces """ + import pygame @@ -15,13 +17,17 @@ cyan = (30, 164, 150) class Piece: + """ A piece class that provides default methods for performing rotations """ def __init__(self): + """ Initialize a piece """ self.square = square_template.copy() def rotate_clockwise(self): + """ Rotate the piece clockwise """ self.elements = list(zip(*self.elements[::-1])) def rotate_counter_clockwise(self): + """ Rotate the piece counter-clockwise """ self.rotate_clockwise() self.rotate_clockwise() self.rotate_clockwise() |