Mar-05-2022, 10:41 AM
Dear deanhystad,
thanks a lot for you answer!
I prefer to draw the names of persons with the bricks - I made an Excel-Macro, which generates the coordinates for me. I've attached the macro code (if you are interested)...
I've got an error, which I can't fix (because I'm not experienced in it)...
Have a nice weekend!
thanks a lot for you answer!
I prefer to draw the names of persons with the bricks - I made an Excel-Macro, which generates the coordinates for me. I've attached the macro code (if you are interested)...
I've got an error, which I can't fix (because I'm not experienced in it)...
BRICK_COORDS = ( (32, 32), (32, 64), (32, 96), (32, 128), (32, 160), (32, 192), (64, 64), (96, 96), (128, 64), (160, 32), (160, 64), (160, 96), (160, 128), (160, 160), (160, 192), (224, 32), (224, 64), (224, 96), (224, 128), (224, 160), (224, 192), (256, 32), (256, 128), (288, 32), (288, 64), (288, 96), (288, 128), (288, 160), (288, 192), (352, 32), (352, 64), (352, 96), (352, 128), (352, 160), (352, 192), (384, 32), (384, 96), (384, 128), (416, 32), (416, 64), (416, 96), (416, 160), (448, 192), (512, 32), (512, 64), (512, 96), (512, 128), (512, 160), (512, 192), (544, 32), (544, 192), (576, 32), (576, 192), (640, 32), (640, 64), (640, 96), (640, 128), (640, 160), (640, 192), (672, 32), (672, 192), (704, 32), (704, 192), (736, 32), (736, 64), (736, 96), (736, 128), (736, 160), (736, 192))
while len(lives) > 0: random.shuffle(BRICK_COORDS) for coords in BRICK_COORDS[:30]: Brick(*coords)
Traceback (most recent call last): File "D:\Daten\Breakout neu 2\main.py", line 345, in <module> main() File "D:\Daten\Breakout neu 2\main.py", line 310, in main random.shuffle(BRICK_COORDS) File "C:\Users\...\AppData\Local\Programs\Python\Python310\lib\random.py", line 394, in shuffle x[i], x[j] = x[j], x[i] TypeError: 'tuple' object does not support item assignmentPlease help me out...
Have a nice weekend!