first_loop = 1 # Main Bot loop while menu.demo and shape.game_state: check_input() time = pygame.time.get_ticks() - start_time next_shape = Shape(shape_color, shape_queue[1], 0, 12, 0) if shape.state == 1 or first_loop == 1: next_shape.deactivate() shape_queue.pop(0) shape_queue.append(randint(0, 6)) shape = Shape(shape_color, shape_queue[0]) shape_color = (randint(1, 255), randint(1, 255), randint(1, 255)) location = bot.check_spot_score(shape, area.matrix()) shape.track_x = location[1] shape.rotation = location[2] first_loop = 0 # Delay (increase to increase the shape drop delay) if init < time: shape.move_down(area.matrix()) init += 0 # redraws the screen to update everything screen.fill((0, 0, 0)) shape.draw_shape(area.matrix(), screen) area.draw(shape, area.matrix(), screen) area.print_game_info(screen) next_shape.update_shape(area.matrix())
first_loop = 1 # Main Bot loop while menu.demo and shape.game_state: check_input() time = pygame.time.get_ticks() - start_time next_shape = Shape(shape_color,shape_queue[1],0,12,0) if shape.state == 1 or first_loop == 1: next_shape.deactivate() shape_queue.pop(0) shape_queue.append(randint(0,6)) shape = Shape(shape_color, shape_queue[0]) shape_color=(randint(1,255), randint(1,255), randint(1,255)) location = bot.check_spot_score(shape, area.matrix()) shape.track_x = location[1] shape.rotation = location[2] first_loop = 0 # Delay (increase to increase the shape drop delay) if init < time: shape.move_down(area.matrix()) init += 0 # redraws the screen to update everything screen.fill((0,0,0)) shape.draw_shape(area.matrix(), screen) area.draw(shape, area.matrix(), screen) area.print_game_info(screen) next_shape.update_shape(area.matrix())