diff options
author | Olivier Gayot <olivier.gayot@sigexec.com> | 2021-11-13 12:05:18 +0100 |
---|---|---|
committer | Olivier Gayot <olivier.gayot@sigexec.com> | 2021-11-13 16:58:31 +0100 |
commit | f4049ca3bbd79c2c6568e519cde92836cc79769a (patch) | |
tree | fde18ce64554c16981b57450f73b6e752146631d /cameltris/piece.py | |
parent | c21660de843d0082f5fd1e5a4d3927f52ecb106e (diff) |
Add optional coordinates to a piece
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Diffstat (limited to 'cameltris/piece.py')
-rw-r--r-- | cameltris/piece.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cameltris/piece.py b/cameltris/piece.py index d8e7b63..3636fbd 100644 --- a/cameltris/piece.py +++ b/cameltris/piece.py @@ -1,8 +1,11 @@ """ Module that defines all types of pieces """ +from typing import Optional + import pygame from .color import Color +from .coordinates import Coordinates square_template = pygame.Surface((48, 48)) @@ -12,6 +15,7 @@ class Piece: """ A piece class that provides default methods for performing rotations """ def __init__(self): """ Initialize a piece """ + self.coord: Optional[Coordinates] = None self.square = square_template.copy() def rotate_clockwise(self): |