From e53a58ab0b022e5ff86ee2f68cb587cf4ff34753 Mon Sep 17 00:00:00 2001 From: Celia AREZKI <celia.arezki.1@etu.univ-amu.fr> Date: Sun, 17 Nov 2024 21:04:46 +0100 Subject: [PATCH] BoardBehavior : add the documentation --- src/main/java/model/BoardBehavior.java | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/main/java/model/BoardBehavior.java b/src/main/java/model/BoardBehavior.java index cf02e8d..be7af53 100644 --- a/src/main/java/model/BoardBehavior.java +++ b/src/main/java/model/BoardBehavior.java @@ -1,11 +1,27 @@ package model; import util.Position; - import java.util.List; -public interface BoardBehavior { - public int stepNumber(); // Numéro de l'étape actuelle. - public List<Position> updateToNextGeneration(); - public void reset(); +public interface BoardBehavior<S> { + /** + * Get the current step number or generation of the board. + * + * @return The current step number or generation. + */ + int stepNumber(); + + /** + * Update the board to its next generation or state. This method may modify the + * internal state of the board and return a list of positions that have changed + * during the update. + * + * @return A list of positions that have changed during the update. + */ + List<Position> updateToNextGeneration(); + + /** + * Reset the board to its initial state. + */ + void reset(); } -- GitLab