Skip to content

Commit

Permalink
New pieces are smaller so I modified the pieces scale
Browse files Browse the repository at this point in the history
  • Loading branch information
RickMMA committed Apr 10, 2024
1 parent e5fd803 commit 8fadc64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ def __init__(self, piece):
if piece[0] != "--":
self._image = pygame.image.load(
os.path.join(os.getcwd(), "assets", "chess_pieces", f"{piece[0]}.png")).convert_alpha()
self.image = pygame.transform.scale_by(self._image, 2)
self.rect = pygame.Rect((self.pos[0], self.pos[1]),
(self.image.get_size()[0], self.image.get_size()[1]))
(self._image.get_size()[0], self._image.get_size()[1]))
else:
# Insert rect when there is no piece
self.rect = pygame.Rect((self.pos[0], self.pos[1]),
(self._default_image_size[0], self._default_image_size[1]))

Expand Down

0 comments on commit 8fadc64

Please sign in to comment.