From c2f9c4d976b4274d96892a188b7dd341e3bbcf85 Mon Sep 17 00:00:00 2001 From: laure Date: Wed, 29 May 2024 18:27:57 +0200 Subject: [PATCH] correction in agent files --- src/backend/Agent.java | 2 +- src/backend/Sheep.java | 2 +- src/backend/Wolf.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/Agent.java b/src/backend/Agent.java index 00d199f..bc71b36 100644 --- a/src/backend/Agent.java +++ b/src/backend/Agent.java @@ -34,7 +34,7 @@ public abstract class Agent { // then returns a boolean // if false, agent dies at end of turn // see step function in Simulator - public abstract boolean liveTurn(ArrayList neighbors, World world); + public abstract boolean liveTurn(ArrayList neighbors, Simulator world); } diff --git a/src/backend/Sheep.java b/src/backend/Sheep.java index 0317fab..ac53a2d 100644 --- a/src/backend/Sheep.java +++ b/src/backend/Sheep.java @@ -29,7 +29,7 @@ public class Sheep extends Agent { * it can interact with the cells or with other animals * as you wish */ - public boolean liveTurn(ArrayList neighbors, World world) { + public boolean liveTurn(ArrayList neighbors, Simulator world) { if(world.getCell(x, y)==1) { world.setCell(x, y, 0); } else { diff --git a/src/backend/Wolf.java b/src/backend/Wolf.java index 4288bdb..584f4b0 100644 --- a/src/backend/Wolf.java +++ b/src/backend/Wolf.java @@ -25,7 +25,7 @@ public class Wolf extends Agent { * it can interact with the cells or with other animals * as you wish */ - public boolean liveTurn(ArrayList neighbors, World world) { + public boolean liveTurn(ArrayList neighbors, Simulator world) { if(world.getCell(x, y)==1) { world.setCell(x, y, 0); } else {