def code04(self): w = len(self.Matrix[0]) for x in range(0, 8): self.printIt04(w, x) . . . def printIt04(self, w, x): if (w > 200): MStartCol = int(round( (w - 200)/2)) MEndCol = 200 + MStartCol IStartCol = 0 IEndCol = 200 else: MStartCol = 0 MEndCol = w IStartCol = int(round( (200 - w)/2)) IEndCol = IStartCol + w r = int(round( (w - 200)/2)) for col in range(MStartCol, MEndCol): for row in range(0, x+1): if self.Matrix[7-row][col] == 1: self.img.put ("#ff0000", ( IStartCol - MStartCol + col, 7-row)) else: self.img.put ("#000000", ( IStartCol - MStartCol + col, 7-row)) time.sleep(0.2)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)