-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtesting_area.py
74 lines (45 loc) · 1.18 KB
/
testing_area.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import pygame
from Noob import Environment,Agent
import design as d
import colorgentool as genn
import colors as cc
import random as r
pygame.init()
window_width = 1280
window_height = 720
screen = pygame.display.set_mode((window_width, window_height), pygame.RESIZABLE)
pygame.display.set_caption("Valor")
pygame.mouse.set_visible(False)
pygame.init()
i = pygame.display.Info()
color1 = cc.colorlist[12]
newcolor = genn.diffuser(color1,color1)
bg = cc.colorlist[0]
movr = False
keyy = None
clock = pygame.time.Clock()
keys_pressed = set()
fps = 60
ti = 0
bgg = d.Background(screen,12,1)
tra = d.Trailsquare(5)
running = True
episode = 0
clock = pygame.time.Clock()
env = Environment(screen)
while running:
clock.tick(fps)
tra.update(pygame.mouse.get_pos())
for event in pygame.event.get():
if event.type == pygame.QUIT:
running= False
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_BACKSPACE:
running = False
# Get current state
# Render the environment
env.render(screen)
# Update display
pygame.display.update()
bgg.draw(screen)
tra.draw(screen)