Wrap perfectly the map on the screen, bricks won't teleport randomly anymore

This commit is contained in:
Yohann D'ANELLO
2020-11-26 21:59:48 +01:00
parent f2f34bfbc6
commit 3e7dabc94e
2 changed files with 12 additions and 1 deletions

View File

@ -48,7 +48,10 @@ class DisplayManager:
if self.game.state == GameMode.PLAY:
# The map pad has already the good size
self.mapdisplay.refresh(0, 0, self.rows * 4 // 5,
self.cols * 4 // 5, resize_pad=False)
self.mapdisplay.pack.tile_width
* (self.cols * 4 // 5
// self.mapdisplay.pack.tile_width),
resize_pad=False)
self.statsdisplay.refresh(0, self.cols * 4 // 5 + 1,
self.rows, self.cols // 5 - 1)
self.logsdisplay.refresh(self.rows * 4 // 5 + 1, 0,