diff --git a/Viron b/Viron index d9809d5..f1f3da0 160000 --- a/Viron +++ b/Viron @@ -1 +1 @@ -Subproject commit d9809d5632aa341f4f340f741158465022c2ff87 +Subproject commit f1f3da02ba4b41675b13529c88ac8fc7d56fba2e diff --git a/main.py b/main.py index 5814952..bfcf442 100644 --- a/main.py +++ b/main.py @@ -1,7 +1,5 @@ -from operator import truediv import random import pygame -from Viron.src.main.python.preponderous.viron.models.location import Location from Viron.src.main.python.preponderous.viron.services.environmentService import EnvironmentService from Viron.src.main.python.preponderous.viron.services.locationService import LocationService from graphik import Graphik @@ -40,11 +38,12 @@ def log(message): exit_after_create = True def drawEnvironment(locations, graphik, locationWidth, locationHeight): for location in locations: - location = Location(location_id=location['locationId'], x=location['x'], y=location['y']) red = random.randrange(50, 200) green = random.randrange(50, 200) blue = random.randrange(50, 200) - graphik.drawRectangle(location.get_x() * locationWidth, location.get_y() * locationHeight, locationWidth, locationHeight, (red,green,blue)) + x = location.get_x() * locationWidth + y = location.get_y() * locationHeight + graphik.drawRectangle(x - 1, y - 1, locationWidth * 1.5, locationHeight * 1.5, (red,green,blue)) def main(): pygame.init()