from BottleSimulator import BottleSimulator import time c = BottleSimulator(7, 5, bottle_type="hexagon") c.draw_bottles() for j in range(256): for i in range(11): c.draw_bottle_i(i*3,(j,j/2,0)) c.draw_bottle_i(i*3+1,(0,j,j/2)) c.draw_bottle_i(i*3+2,(0,j/2,j)) time.sleep(100)
self.y = y self.health = health class player_ship(object): def __init__(self, x, y, health=3): self.x = x self.y = y self.health = health class laser(object): def __init__(self, direction, x, y): self.direction = direction self.position_x = x self.position_y = y def move(self): position_x += direction c = BottleSimulator(7, 5, bottle_type="hexagon") c.draw_bottles() for i in range(11): c.draw_bottle_i(i * 3, (255, 0, 0)) c.draw_bottle_i(i * 3 + 1, (0, 255, 0)) c.draw_bottle_i(i * 3 + 2, (0, 0, 255)) time.sleep(100)
from BottleSimulator import BottleSimulator import time c = BottleSimulator(10, 10) for j in range(100): c = BottleSimulator(1+j, 1+j) c.draw_bottles() time.sleep(0.3) time.sleep(500)