l1 = 5 + l1 + 50 coin = Coin() coin.loadObstacle('coin') for i in range(7): c1 = random.randint(2, 5) c2 = random.randint(3, 8) x = random.randint(1, 33) y = random.randint(30 + i * 20, 240 + i * 20) for j in range(c1): for k in range(c2): coin.place(board.matrix, x + j, y + k) magnet = Magnet() magnet.loadObstacle('magnet') x1 = 20 x2 = 200 magnet.place(board.matrix, x1, x2) mando = Mando() mando.loadMando(board.matrix, 'n', cnt) board.printBoard(cnt, config.dragon_lives) dragon = Dragon() dragon.loadObstacle('dragon') dragon.place(board.matrix, 20, 445) st = time.time() prev_gravity_time = time.time() dBtime = time.time() shield_time = time.time() gtime = time.time() flag = 'G' bullets = [] dragon_bullets = [] while True:
drag = Dragon(30, 500) drag.place(screen) for i in range(40): x = randint(5, 30) y = randint(25, 450) coin_p = Coin(x, y) coin_p.place(screen) for j in range(10, 30): x = randint(5, 30) y = randint(50, 350) beam = Firebeam(x, y) beam.place(screen) mag = Magnet(2, 80) mag.place(screen) counter3 = time() screen.print_board(0, man, drag) #print("time left==") #print(100-counter3) count_gravity = 0 count_magnet = 0 count_board = 0 print_range = 0 count_pace = 0 counter = time() counter2 = time() counter_dragbull = 0 while True: