mirror of
https://github.com/n0remac/game-jam-2020.git
synced 2025-12-09 12:05:19 -06:00
use modulus to skip extra rotations, use _ for repeated code
This commit is contained in:
@@ -148,6 +148,6 @@ class Level:
|
||||
def rotate_level(self, times_rotated):
|
||||
m = np.array(self.level)
|
||||
print(m)
|
||||
for i in range(0, times_rotated):
|
||||
for _ in range(0, times_rotated % 4):
|
||||
m = np.rot90(m)
|
||||
self.level = m.tolist()
|
||||
Reference in New Issue
Block a user