code cleaning
This commit is contained in:
parent
f860b1ce45
commit
bdddb68e90
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user