From bdddb68e906025fc9cdde884639ee05545ee94e8 Mon Sep 17 00:00:00 2001 From: piowyg Date: Sat, 27 Mar 2021 18:30:45 +0100 Subject: [PATCH] code cleaning --- src/environment.py | 2 +- src/fieldsFactory.py | 3 --- src/game_ui.py | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/environment.py b/src/environment.py index 3342fb8..8171753 100644 --- a/src/environment.py +++ b/src/environment.py @@ -7,7 +7,7 @@ from field import Field def generate_field () -> List[List[Field]]: fieldsFactory = FieldsFactory() fieldsList = fieldsFactory.getFieldsList() - return [choices (fieldsList, weights=[10, 10, 4, 4, 4, 4, 4, 4, 4, 4, 4], k=10) for _ in range (10)] + return [choices(fieldsList, weights=[10, 10, 4, 4, 4, 4, 4, 4, 4, 4, 4], k=10) for _ in range(10)] class Environment: diff --git a/src/fieldsFactory.py b/src/fieldsFactory.py index becec56..640902b 100644 --- a/src/fieldsFactory.py +++ b/src/fieldsFactory.py @@ -1,11 +1,8 @@ from typing import List - from field import Field class FieldsFactory: - def __init__(self): - pass def createField(self, number) -> Field: if number > 3: return Field(number, True) diff --git a/src/game_ui.py b/src/game_ui.py index c76f0ae..5451046 100644 --- a/src/game_ui.py +++ b/src/game_ui.py @@ -29,7 +29,6 @@ class GameUi: def update(self): for x in range(10): for y in range(10): - print(IMAGES[self.env.field[y][x].number]) self.screen.blit(IMAGES[self.env.field[y][x].number], (x * 80, y * 80)) self.screen.blit(self.agent.img, (self.agent.x * 80, self.agent.y * 80)) pg.display.update()