-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
24 lines (19 loc) · 802 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import math
import pygame
from constants import *
from animated_list import AnimatedList
if __name__ == "__main__":
screen = pygame.display.set_mode((WITDH, HEIGHT))
#you can change these functions
growth_rate_function=lambda x: x
pos_modifier_function=lambda x,y,z : (0,0)
animated_list = AnimatedList(screen, growth_rate_function=growth_rate_function, pos_modifier_function=pos_modifier_function, draw_links=True, draw_nodes=True)
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
screen.fill((0,0,0))
x,y = pygame.mouse.get_pos()
animated_list.move_linked_list_to_position(x,y)
pygame.time.wait(5)
pygame.display.update()