diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c18dd8d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +__pycache__/ diff --git a/agent.py b/agent.py index bf1f8ab..bbca452 100644 --- a/agent.py +++ b/agent.py @@ -3,10 +3,11 @@ import settings class Instance: - def __init__(self): + def __init__(self, tank_capacity): size = settings.Field.size self.rect = pygame.Rect(0, 0, size(), size()) self.action = '' + self.tank_capacity = tank_capacity def coordinates(self): return { @@ -19,7 +20,13 @@ class Instance: def y(self): return int(self.rect.y / settings.Field.size()) + + def get_tank_capacity(self): + return self.tank_capacity + def set_tank_capacity(self, fuel_units): + self.tank_capacity = fuel_units + def move(self): key_pressed = pygame.key.get_pressed() height = settings.Pygame.height() diff --git a/assets/tracktor/tractor.png b/assets/tracktor/tractor.png new file mode 100644 index 0000000..4bb0323 Binary files /dev/null and b/assets/tracktor/tractor.png differ diff --git a/dot-22-433567.png b/dot-22-433567.png deleted file mode 100644 index be7c968..0000000 Binary files a/dot-22-433567.png and /dev/null differ diff --git a/main.py b/main.py index f087020..a850cc3 100644 --- a/main.py +++ b/main.py @@ -6,7 +6,7 @@ import settings import common import agent -AGENT_IMG = pygame.image.load("dot-22-433567.png") +AGENT_IMG = pygame.image.load('./assets/tracktor/tractor.png') AGENT = pygame.transform.scale(AGENT_IMG, (settings.Field.size(), settings.Field.size())) possibleFields = { @@ -65,7 +65,7 @@ def draw_window(agent, fields): common = common.Instance() -agent = agent.Instance() +agent = agent.Instance(1000) def main():