Skip to content

Commit de8157a

Browse files
Merge pull request #3 from Preponderous-Software/lib/use-viron
Lib/use viron
2 parents 383bc93 + b40db2b commit de8157a

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

main.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
from operator import truediv
21
import random
32
import pygame
4-
from Viron.src.main.python.preponderous.viron.models.location import Location
53
from Viron.src.main.python.preponderous.viron.services.environmentService import EnvironmentService
64
from Viron.src.main.python.preponderous.viron.services.locationService import LocationService
75
from graphik import Graphik
@@ -40,11 +38,12 @@ def log(message):
4038
exit_after_create = True
4139
def drawEnvironment(locations, graphik, locationWidth, locationHeight):
4240
for location in locations:
43-
location = Location(location_id=location['locationId'], x=location['x'], y=location['y'])
4441
red = random.randrange(50, 200)
4542
green = random.randrange(50, 200)
4643
blue = random.randrange(50, 200)
47-
graphik.drawRectangle(location.get_x() * locationWidth, location.get_y() * locationHeight, locationWidth, locationHeight, (red,green,blue))
44+
x = location.get_x() * locationWidth
45+
y = location.get_y() * locationHeight
46+
graphik.drawRectangle(x - 1, y - 1, locationWidth * 1.5, locationHeight * 1.5, (red,green,blue))
4847

4948
def main():
5049
pygame.init()

0 commit comments

Comments
 (0)