From 655ac88f4e73b2df532a451aedf5a561ea1b0d2c Mon Sep 17 00:00:00 2001
From: Pacien TRAN-GIRARD
Date: Sat, 21 Nov 2015 10:36:18 +0100
Subject: Import project structure
---
src/ch/epfl/maze/simulation/Simulation.java | 84 +++++++++++++++++++++++++++++
1 file changed, 84 insertions(+)
create mode 100644 src/ch/epfl/maze/simulation/Simulation.java
(limited to 'src/ch/epfl/maze/simulation/Simulation.java')
diff --git a/src/ch/epfl/maze/simulation/Simulation.java b/src/ch/epfl/maze/simulation/Simulation.java
new file mode 100644
index 0000000..c3190b3
--- /dev/null
+++ b/src/ch/epfl/maze/simulation/Simulation.java
@@ -0,0 +1,84 @@
+package ch.epfl.maze.simulation;
+
+import java.util.List;
+import java.util.Map;
+
+import ch.epfl.maze.graphics.Animation;
+import ch.epfl.maze.physical.Animal;
+import ch.epfl.maze.physical.World;
+
+/**
+ * The {@code Simulation} interface defines a set of rules that must be
+ * fulfilled in order to be displayed.
+ *
+ */
+
+public interface Simulation {
+
+ /**
+ * Asks the {@code Simulation} to compute the next move and, if specified,
+ * notifies the changes to the listener.
+ *
+ * @param listener
+ * The listener to which the function will notify the changes
+ * (can be null)
+ */
+
+ public void move(Animation listener);
+
+ /**
+ * Determines if the simulation is over.
+ *
+ * @return true if no more moves can be made, false otherwise
+ */
+
+ public boolean isOver();
+
+ /**
+ * Retrieves the current state of the simulated world.
+ *
+ * @return The {@code World} that is being simulated
+ */
+
+ public World getWorld();
+
+ /**
+ * Retrieves the step counter of the {@code Simulation}.
+ *
+ * @return The current step counter
+ */
+
+ public int getSteps();
+
+ /**
+ * Retrieves the mapping of the steps done by the animals that have finished
+ * the simulation.
+ *
+ * @return Map of steps done by animals which have accomplished the
+ * simulation
+ */
+
+ public Map> getArrivalTimes();
+
+ /**
+ * Retrieves the record table of the animals that have finished the
+ * simulation.
+ *
+ * @return A {@code String} containing the top 10 animals which have
+ * accomplished the simulation
+ */
+
+ public String getRecordTable();
+
+ /**
+ * Restarts the simulation from the beginning.
+ */
+
+ public void restart();
+
+ /**
+ * Stops abruptly the simulation.
+ */
+
+ public void stop();
+}
--
cgit v1.2.3