diff --git a/livraison/README.txt b/livraison/README.txt new file mode 100644 index 0000000..f5b3098 --- /dev/null +++ b/livraison/README.txt @@ -0,0 +1,44 @@ +" Projet de Conception Logiciel conçu par : + +LUCAS Valentin +LEGOT Quentin +NEVEU Thomas + +# Attention + +Ce projet utilise la possibilité de séparé son projet en plusieurs modules en avec Gradle ainsi la disposition des dossiers demandé pour le rendu n'a pas pu être respecté +afin que le programme fonctionne. + +# Dépendances + +Le projet nécessite le ressources suivante pour fonctionner: + +- Java 17 (téléchargeable depuis apt sur Debian 11 ou en téléchargeant sur Oracle ou openJDK) +- Gradle 7.3 ou supérieur (téléchargeable depuis https://gradle.org/releases/ puis en suivez les indications données sur cette page: https://docs.gradle.org/7.3.1/userguide/installation.html#installing_manually ) + +Accédez ensuite à la racine du projet (dossier livraison/ normalement ou du moins le dossier contenant le fichier settings.gradle) pour pouvoir execute le programme + +# Les commandes + +- `gradle :client:run --args="[ARGUMENTS]"` permet de lancer le jeu avec les arguments suivant la logique suivant + - le premier argument concerne le type de vue, indiquer `terminal` pour jouer en mode terminal ou `window` pour jouer en mode fenêtre avec JavaFX + - les arguments suivants concernent les joueurs, ils suivent une forme " [classe du joueur]" + - `type du joueur` pour indiquer si le joueur est: + - `human` pour indiquer un joueur humain utilisant le clavier ou la souris + - `computer` indiquant un joueur ordinateur jouant des coups aléatoire + - `computerS` indiquant un joueur ordinateur semi-aléatoire + - `classe du joueur` est un paramètre facultatif correspond à: + - `tank` indiquant que le joueur est de type tank et qu'il subit moins de dégâts des explosions que les autres ses coups en energies pour faire des actions sont plus élevés + - `dps` ou `default` et un joueur standard, infligeant le plus de dégâts d'attaque et ayant un coup de déplacement équilibré, c'est la valeur par défaut si la classe de ce joueur n'est pas donné + - `support` est un joueur basé sur la pose d'explosif, n'allant que peu au combat direct, ses coups de déplacement sont standard mais ses coups en energies de pose de mine ou de bombes sont les plus faibles. + - Un exemple de ce que cela peux donner est: `window computer default human support computerS dps human tank` + - ici On joue en vue fenêtre avec 4 joueurs: + - computer de classe default (ou dps) + - human de classe support + - computerS de classe dps (ou default) + - human de classe tank +- `gradle build` permet de compiler, exécuter les tests et archiver les classes dans un fichier `.jar` pour chaque module (client et server) +- `gradle javadoc` pour générer la javadoc, une javadoc est générer par projet (soit 2 javadocs), nous vous mettons à disposition dans le dossier livraison un dossier javadoc pour faciliter la navigation + - Si vous voulez naviguer dans la nouvelle javadoc que vous aurez générer, vous pouvez y accéder en allant dans livraison/MODULE/build/doc/javadoc + - les modules étant `client` et `server` +- `gradle test` pour exécuter les tests unitaires \ No newline at end of file diff --git a/livraison/build.gradle b/livraison/build.gradle new file mode 100644 index 0000000..ebdf119 --- /dev/null +++ b/livraison/build.gradle @@ -0,0 +1,8 @@ +subprojects { + apply plugin: 'java' + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + javadoc { + options.memberLevel = JavadocMemberLevel.PRIVATE + } +} diff --git a/livraison/buildSrc/build.gradle b/livraison/buildSrc/build.gradle new file mode 100644 index 0000000..04d80d2 --- /dev/null +++ b/livraison/buildSrc/build.gradle @@ -0,0 +1,13 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + // Support convention plugins written in Groovy. Convention plugins are build scripts in 'src/main' that automatically become available as plugins in the main build. + id 'groovy-gradle-plugin' +} + +repositories { + // Use the plugin portal to apply community plugins in convention plugins. + gradlePluginPortal() +} diff --git a/livraison/buildSrc/src/main/groovy/fr.lnl.game.java-application-conventions.gradle b/livraison/buildSrc/src/main/groovy/fr.lnl.game.java-application-conventions.gradle new file mode 100644 index 0000000..553e245 --- /dev/null +++ b/livraison/buildSrc/src/main/groovy/fr.lnl.game.java-application-conventions.gradle @@ -0,0 +1,11 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + // Apply the common convention plugin for shared build configuration between library and application projects. + id 'fr.lnl.game.java-common-conventions' + + // Apply the application plugin to add support for building a CLI application in Java. + id 'application' +} diff --git a/livraison/buildSrc/src/main/groovy/fr.lnl.game.java-common-conventions.gradle b/livraison/buildSrc/src/main/groovy/fr.lnl.game.java-common-conventions.gradle new file mode 100644 index 0000000..1f9f376 --- /dev/null +++ b/livraison/buildSrc/src/main/groovy/fr.lnl.game.java-common-conventions.gradle @@ -0,0 +1,31 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + // Apply the java Plugin to add support for Java. + id 'java' +} + +repositories { + // Use Maven Central for resolving dependencies. + mavenCentral() +} + +dependencies { + constraints { + // Define dependency versions as constraints + implementation 'org.apache.commons:commons-text:1.9' + } + + // Use JUnit Jupiter API for testing. + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.1' + + // Use JUnit Jupiter Engine for testing. + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine' +} + +tasks.named('test') { + // Use junit platform for unit tests. + useJUnitPlatform() +} diff --git a/livraison/buildSrc/src/main/groovy/fr.lnl.game.java-library-conventions.gradle b/livraison/buildSrc/src/main/groovy/fr.lnl.game.java-library-conventions.gradle new file mode 100644 index 0000000..af0a9af --- /dev/null +++ b/livraison/buildSrc/src/main/groovy/fr.lnl.game.java-library-conventions.gradle @@ -0,0 +1,11 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + // Apply the common convention plugin for shared build configuration between library and application projects. + id 'fr.lnl.game.java-common-conventions' + + // Apply the java-library plugin for API and implementation separation. + id 'java-library' +} diff --git a/livraison/client/build.gradle b/livraison/client/build.gradle new file mode 100644 index 0000000..901cb24 --- /dev/null +++ b/livraison/client/build.gradle @@ -0,0 +1,33 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id 'application' + id 'fr.lnl.game.java-application-conventions' + id 'org.openjfx.javafxplugin' version '0.0.10' + id 'org.javamodularity.moduleplugin' version '1.8.10' apply false +} + +repositories { + mavenCentral() +} + +dependencies { + implementation project(':server') +} + +javafx { + version = JavaVersion.VERSION_17 + modules = [ 'javafx.controls', 'javafx.graphics' ] +} + +application { + // Define the main class for the application. + mainClassName = 'fr.lnl.game.client.App' + mainModule = "client" +} + +run { + standardInput = System.in +} diff --git a/livraison/client/src/main/java/fr/lnl/game/client/App.java b/livraison/client/src/main/java/fr/lnl/game/client/App.java new file mode 100644 index 0000000..f0475c1 --- /dev/null +++ b/livraison/client/src/main/java/fr/lnl/game/client/App.java @@ -0,0 +1,203 @@ +package fr.lnl.game.client; + +import fr.lnl.game.client.view.AbstractView; +import fr.lnl.game.client.view.Terminal; +import fr.lnl.game.client.view.ViewManager; +import fr.lnl.game.client.view.Window; +import fr.lnl.game.server.games.Game; +import fr.lnl.game.server.games.grid.build.GridFactoryBuilder; +import fr.lnl.game.server.games.grid.build.LockGridFactoryBuilder; +import fr.lnl.game.server.games.player.*; +import fr.lnl.game.server.utils.CrashException; +import fr.lnl.game.server.utils.Point; +import javafx.application.Application; +import javafx.stage.Stage; + +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.LinkedList; +import java.util.List; + +/** + * Application starting point + */ +public class App extends Application { + + private static LinkedList argsList; + private static Game game; + private static ViewManager viewManager; + + public static void main(String[] args) { + try { + argsList = new LinkedList<>(Arrays.asList(args)); + argsList.removeIf(s -> s.startsWith("-D") || s.equals("fr.lnl.game.client.App")); // remove given parameters from gradle + Class clazz; + try { + clazz = parseView(); + } catch (IllegalArgumentException e) { + throw new CrashException(e.getMessage(), e); + } + if(clazz.equals(Terminal.class)) { + launchTerminal(); + } else { + launch(); + } + } catch(CrashException e) { + System.err.println("Une erreur est survenue et l'application a été obligé de fermer"); + System.err.println(e.getCause().toString()); + for (StackTraceElement element : e.getStackTrace()) { + System.err.println(" at " + element.toString()); + } + System.exit(1); + } + } + + /** + * Parse players arguments and create a new instance of Game + * @throws IllegalArgumentException when given argument is unknown + * @throws InvocationTargetException when the creation of the player throw an exception + * @throws NoSuchMethodException when constructor with given parameter in {@link Class#getConstructor(Class[])} + * doesn't exist + * @throws InstantiationException when the instanciation of the player is impossible (like when class is abstract), + * is probably never called + * @throws IllegalAccessException when the instanciation of thr player is impossible (like a private constructor), + * is probably never called + */ + public static void startGame() throws IllegalArgumentException, InvocationTargetException, NoSuchMethodException, + InstantiationException, IllegalAccessException { + List players = parsePlayers(); + GridFactoryBuilder builder = LockGridFactoryBuilder.create().energyProbability(0.95F).wallProbability(0.80F).gridDimensions(12, 12); + game = new Game(builder, players); + } + + @Override + public void start(Stage stage) { + try { + startGame(); + } catch (IllegalArgumentException | InvocationTargetException | NoSuchMethodException | InstantiationException + | IllegalAccessException e) { + throw new CrashException(e.getMessage(), e); + } + viewManager = new ViewManager(game, Window.class, player -> new Window(stage, game, player)); + viewManager.run(); + } + + public static void launchTerminal() { + try { + startGame(); + } catch (IllegalArgumentException | InvocationTargetException | NoSuchMethodException | InstantiationException + | IllegalAccessException e) { + throw new CrashException(e.getMessage(), e); + } + viewManager = new ViewManager(game, Terminal.class, player -> new Terminal(game, player)); + viewManager.run(); + } + + /** + * Parse players arguments and create instances for each player + * @throws IllegalArgumentException when given argument is unknown + * @throws InvocationTargetException when the creation of the player throw an exception + * @throws NoSuchMethodException when constructor with given parameter in {@link Class#getConstructor(Class[])} + * doesn't exist + * @throws InstantiationException when the instanciation of the player is impossible (like when class is abstract), + * is probably never called + * @throws IllegalAccessException when the instanciation of thr player is impossible (like a private constructor), + * is probably never called + */ + public static List parsePlayers() throws IllegalArgumentException, NoSuchMethodException, + InvocationTargetException, InstantiationException, IllegalAccessException { + List playerList = new ArrayList<>(); + Class playerClass = null; + ClassPlayer classPlayer = null; + for(String str : argsList) { + switch (str) { + case "human" -> { + if(playerClass != null) { + playerList.add(createNewPlayer(playerClass, + classPlayer != null ? classPlayer : ClassPlayer.DEFAULT, playerList.size()) + ); + classPlayer = null; + } + playerClass = HumanPlayer.class; + } + case "computer" -> { + if(playerClass != null) { + playerList.add(createNewPlayer(playerClass, + classPlayer != null ? classPlayer : ClassPlayer.DEFAULT, playerList.size()) + ); + classPlayer = null; + } + playerClass = RandomComputerPlayer.class; + } + case "computerS" -> { + if(playerClass != null) { + playerList.add(createNewPlayer(playerClass, + classPlayer != null ? classPlayer : ClassPlayer.DEFAULT, playerList.size()) + ); + classPlayer = null; + } + playerClass = StrategyComputerPlayer.class; + } + case "default" -> classPlayer = ClassPlayer.DEFAULT; + case "tank" -> classPlayer = ClassPlayer.TANK; + case "dps" -> classPlayer = ClassPlayer.DPS; + case "support" -> classPlayer = ClassPlayer.SUPPORT; + default -> throw new IllegalArgumentException("Unknown argument: " + str); + } + } + if(playerClass != null) + playerList.add(createNewPlayer(playerClass, + classPlayer != null ? classPlayer : ClassPlayer.DEFAULT, playerList.size()) + ); + return playerList; + } + + /** + * create a new instance of the player + * @throws IllegalArgumentException when given argument is unknown (probably never called in production) + * @throws InvocationTargetException when the creation of the player throw an exception + * @throws NoSuchMethodException when constructor with given parameter in {@link Class#getConstructor(Class[])} + * doesn't exist + * @throws InstantiationException when the instanciation of the player is impossible (like when class is abstract), + * is probably never called + * @throws IllegalAccessException when the instanciation of thr player is impossible (like a private constructor), + * is probably never called + */ + private static Player createNewPlayer(Class playerClass, ClassPlayer playerType, + int playerListSize) throws NoSuchMethodException, InvocationTargetException, + InstantiationException, IllegalAccessException { + return playerClass.getConstructor(Integer.class, Point.class, ClassPlayer.class) + .newInstance(playerListSize, null, playerType); + } + + /** + * Parse the first argument given by user to know the view to use (Terminal or Window) + * @return The class of the View to use + * @throws IllegalArgumentException when given argument is unknown or no argument is given by user + */ + public static Class parseView() throws IllegalArgumentException { + Class clazz; + if(!argsList.isEmpty()) { + if(argsList.get(0).equals("terminal")) { + clazz = Terminal.class; + } else if(argsList.get(0).equals("window")){ + clazz = Window.class; + } else { + throw new IllegalArgumentException("Unknown argument: " + argsList.get(0)); + } + argsList.removeFirst(); + } else { + throw new IllegalArgumentException("No argument given"); + } + return clazz; + } + + public static ViewManager getViewManager() { + return viewManager; + } + + public static Game getGame() { + return game; + } +} diff --git a/livraison/client/src/main/java/fr/lnl/game/client/ClientPlayer.java b/livraison/client/src/main/java/fr/lnl/game/client/ClientPlayer.java new file mode 100644 index 0000000..6195714 --- /dev/null +++ b/livraison/client/src/main/java/fr/lnl/game/client/ClientPlayer.java @@ -0,0 +1,18 @@ +package fr.lnl.game.client; + +import fr.lnl.game.client.view.View; +import fr.lnl.game.server.games.player.Player; + +/** + * Store a view per player + */ +public record ClientPlayer(Player serverPlayer, View view) { + + public Player getServerPlayer() { + return serverPlayer; + } + + public View getView() { + return view; + } +} diff --git a/livraison/client/src/main/java/fr/lnl/game/client/ViewLambda.java b/livraison/client/src/main/java/fr/lnl/game/client/ViewLambda.java new file mode 100644 index 0000000..284bde6 --- /dev/null +++ b/livraison/client/src/main/java/fr/lnl/game/client/ViewLambda.java @@ -0,0 +1,19 @@ +package fr.lnl.game.client; + +import fr.lnl.game.client.view.View; +import fr.lnl.game.server.games.player.Player; + +/** + * Used as Lambda expression to instantiate a {@link View} per {@link Player} stored in {@link ClientPlayer} + */ +@FunctionalInterface +public interface ViewLambda { + + /** + * A lambda create an anonymous class which implements this interface + * @param player an instance of {@link Player} to store in {@link View} + * @return an instance of view (depending on the first argument when launching the program) + */ + View createViewLambda(Player player); + +} diff --git a/livraison/client/src/main/java/fr/lnl/game/client/listener/ClientEventHandler.java b/livraison/client/src/main/java/fr/lnl/game/client/listener/ClientEventHandler.java new file mode 100644 index 0000000..a0f39d2 --- /dev/null +++ b/livraison/client/src/main/java/fr/lnl/game/client/listener/ClientEventHandler.java @@ -0,0 +1,20 @@ +package fr.lnl.game.client.listener; + +import fr.lnl.game.server.listener.ModelListener; +import javafx.event.ActionEvent; +import javafx.event.EventHandler; + +/** + * implementation of a listener from JavaFX {@link EventHandler} + */ +public record ClientEventHandler(ModelListener listener) implements EventHandler { + + /** + * This method is call by JavaFX when we click to the button + * @param event event class created when clicking on the element + */ + @Override + public void handle(ActionEvent event) { + listener.updateModel(event); + } +} diff --git a/livraison/client/src/main/java/fr/lnl/game/client/listener/DisplayWinnerEvent.java b/livraison/client/src/main/java/fr/lnl/game/client/listener/DisplayWinnerEvent.java new file mode 100644 index 0000000..d7a698b --- /dev/null +++ b/livraison/client/src/main/java/fr/lnl/game/client/listener/DisplayWinnerEvent.java @@ -0,0 +1,21 @@ +package fr.lnl.game.client.listener; + +import fr.lnl.game.client.App; +import fr.lnl.game.server.games.player.Player; +import fr.lnl.game.server.listener.AbstractModelListening; + +/** + * Used to display the winner of the game + */ +public class DisplayWinnerEvent extends AbstractModelListening { + + /** + * This method is call when the game is over + * @param obj contains the winner of the game, can be null + */ + @Override + public void updateModel(Object obj) { + Player winner = (Player) obj; + App.getViewManager().displayWinner(winner); + } +} diff --git a/livraison/client/src/main/java/fr/lnl/game/client/listener/NextPlayerButtonListener.java b/livraison/client/src/main/java/fr/lnl/game/client/listener/NextPlayerButtonListener.java new file mode 100644 index 0000000..3d67ca5 --- /dev/null +++ b/livraison/client/src/main/java/fr/lnl/game/client/listener/NextPlayerButtonListener.java @@ -0,0 +1,40 @@ +package fr.lnl.game.client.listener; + +import fr.lnl.game.client.App; +import fr.lnl.game.server.games.Game; +import fr.lnl.game.server.listener.AbstractModelListening; + +/** + * This method is call when the current player have selected an action to play (or if it's a computer player, will + * select it), then we call {@link Game#play()} and we update the view + */ +public class NextPlayerButtonListener extends AbstractModelListening { + + private final Game game; + private final DisplayWinnerEvent displayWinnerEvent; + + public NextPlayerButtonListener(Game game) { + this.game = game; + this.displayWinnerEvent = new DisplayWinnerEvent(); + } + + /** + * Call when clicking on "SUIVANT" button if current player is a computer player or after the human player selected + * action it want to play + */ + @Override + public void updateModel(Object event) { + // Player player = game.getCurrentPlayer(); + boolean isOver = game.play(); + /* Alert alert = new Alert(Alert.AlertType.INFORMATION); + alert.setTitle("Un joueur ordinateur a joué"); + alert.setHeaderText("Le joueur ordinateur numéro" + player.getId() + " a joué"); + alert.setContentText("Il a joué l'action: " + game.getSelectedAction()); */ + App.getViewManager().updateView(); + if(isOver) { + displayWinnerEvent.updateModel(game.getWinner()); + System.exit(0); + } + //alert.showAndWait(); + } +} diff --git a/livraison/client/src/main/java/fr/lnl/game/client/listener/SelectActionButton.java b/livraison/client/src/main/java/fr/lnl/game/client/listener/SelectActionButton.java new file mode 100644 index 0000000..7e3711d --- /dev/null +++ b/livraison/client/src/main/java/fr/lnl/game/client/listener/SelectActionButton.java @@ -0,0 +1,38 @@ +package fr.lnl.game.client.listener; + +import fr.lnl.game.client.App; +import fr.lnl.game.client.view.Window; +import fr.lnl.game.server.games.Game; +import fr.lnl.game.server.games.action.ReunionSameAction; +import fr.lnl.game.server.listener.AbstractModelListening; + +/** + * Used when the human player select type of action it want to play + */ +public class SelectActionButton extends AbstractModelListening { + + private final Window window; + private final ReunionSameAction reunionSameAction; + private final Game game; + + public SelectActionButton(Game game, Window window, ReunionSameAction reunionSameAction) { + this.game = game; + this.window = window; + this.reunionSameAction = reunionSameAction; + } + + /** + * This method is call when the player select the type of action it want to play + * @param obj contain information about the event like the button where the player clicked + */ + @Override + public void updateModel(Object obj) { + if(reunionSameAction.getActions().size() == 1){ + game.setSelectedAction(reunionSameAction.getActions().get(0)); + window.getNextPlayerButtonListener().updateModel(obj); + } else { + window.setSelectedReunionAction(reunionSameAction); + App.getViewManager().updateView(); // update screen + } + } +} diff --git a/livraison/client/src/main/java/fr/lnl/game/client/listener/SelectDirectionListener.java b/livraison/client/src/main/java/fr/lnl/game/client/listener/SelectDirectionListener.java new file mode 100644 index 0000000..4d95554 --- /dev/null +++ b/livraison/client/src/main/java/fr/lnl/game/client/listener/SelectDirectionListener.java @@ -0,0 +1,34 @@ +package fr.lnl.game.client.listener; + +import fr.lnl.game.client.view.Window; +import fr.lnl.game.server.games.Game; +import fr.lnl.game.server.games.action.Action; +import fr.lnl.game.server.listener.AbstractModelListening; + +/** + * Call when the player selected the direction where it wants to play it + */ +public class SelectDirectionListener extends AbstractModelListening { + + private final Game game; + private final Action action; + private final Window window; + + public SelectDirectionListener(Game game, Window window, Action action) { + this.game = game; + this.window = window; + this.action = action; + } + + /** + * This method is call when the player click on the button to select the direction of the previously selected action + * @param obj contain information about the event like the button where the player clicked + */ + @Override + public void updateModel(Object obj) { + game.setSelectedAction(action); + window.setSelectedReunionAction(null); + window.getNextPlayerButtonListener().updateModel(obj); + + } +} diff --git a/livraison/client/src/main/java/fr/lnl/game/client/listener/package-info.java b/livraison/client/src/main/java/fr/lnl/game/client/listener/package-info.java new file mode 100644 index 0000000..0e9f04f --- /dev/null +++ b/livraison/client/src/main/java/fr/lnl/game/client/listener/package-info.java @@ -0,0 +1,4 @@ +/** + * Package that contains every view listeners + */ +package fr.lnl.game.client.listener; \ No newline at end of file diff --git a/livraison/client/src/main/java/fr/lnl/game/client/package-info.java b/livraison/client/src/main/java/fr/lnl/game/client/package-info.java new file mode 100644 index 0000000..3ade71c --- /dev/null +++ b/livraison/client/src/main/java/fr/lnl/game/client/package-info.java @@ -0,0 +1,4 @@ +/** + * Client package + */ +package fr.lnl.game.client; \ No newline at end of file diff --git a/livraison/client/src/main/java/fr/lnl/game/client/view/AbstractView.java b/livraison/client/src/main/java/fr/lnl/game/client/view/AbstractView.java new file mode 100644 index 0000000..ec020d6 --- /dev/null +++ b/livraison/client/src/main/java/fr/lnl/game/client/view/AbstractView.java @@ -0,0 +1,18 @@ +package fr.lnl.game.client.view; + +import fr.lnl.game.server.games.Game; +import fr.lnl.game.server.games.player.Player; + +/** + * Abstract class implemented by every view classes + */ +public abstract class AbstractView implements View { + + protected final Player player; + protected Game game; + + public AbstractView(Game game, Player player) { + this.game = game; + this.player = player; + } +} diff --git a/livraison/client/src/main/java/fr/lnl/game/client/view/Cell.java b/livraison/client/src/main/java/fr/lnl/game/client/view/Cell.java new file mode 100644 index 0000000..caa47ad --- /dev/null +++ b/livraison/client/src/main/java/fr/lnl/game/client/view/Cell.java @@ -0,0 +1,89 @@ +package fr.lnl.game.client.view; + +import fr.lnl.game.server.games.Game; +import fr.lnl.game.server.games.action.Shot; +import fr.lnl.game.server.games.grid.elements.Bomb; +import fr.lnl.game.server.games.grid.elements.EnergyBall; +import fr.lnl.game.server.games.grid.elements.Mine; +import fr.lnl.game.server.games.grid.elements.Wall; +import fr.lnl.game.server.games.player.Player; +import javafx.scene.image.Image; +import javafx.scene.image.ImageView; +import javafx.scene.layout.*; +import javafx.scene.paint.Color; +import javafx.scene.shape.Rectangle; + +/** + * classe qui a pour but de générer chaque case de la grid et de vérifier les entités présentes dessus + * (Mur, Joueur, Energie, Bombe, etc.) + */ +public class Cell extends Rectangle { + + //Images libres de droit : + //https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/resource-packs/1242533-pixel-perfection-now-with-polar-bears-1-11 + //https://www.stocklib.fr/media-134367689/pixel-game-icons-vector-isolated-bombs-with-fire-graphics-of-retro-gaming-flat-style-of-weapon-with-flames-destruction-and-danger-explosive-substance.html?keyword=bomb%20pixel + + private static final Image PLAYER_IMAGE = new Image("player.png"); + private static final Image PLAYER_SHIELD_IMAGE = new Image("player_shield.png"); + private static final Image PLAYER_SHOT_IMAGE = new Image("player_shot.png"); + private static final Image ENERGY_BALL_IMAGE = new Image("energyBall.png"); + private static final Image BOMB_IMAGE = new Image("bomb.png"); + private static final Image MINE_IMAGE = new Image("mine.png"); + private static final Image WALL_IMAGE = new Image("wall.png"); + private static final Image BACKGROUND_IMAGE = new Image("background.png"); + private static final BackgroundImage BG = new BackgroundImage(BACKGROUND_IMAGE,BackgroundRepeat.NO_REPEAT,BackgroundRepeat.NO_REPEAT,BackgroundPosition.DEFAULT, + BackgroundSize.DEFAULT); + + public Cell(int x, int y){ + setWidth(Window.cellSize); + setHeight(Window.cellSize); + relocate(x * Window.cellSize,y * Window.cellSize); + setFill(Color.WHITE); + setStroke(Color.DARKGRAY); + } + + /** + * @param object the object we'll define the type + * @return a pane which contains an image depending on the type of the object + */ + public static StackPane setImageObject(Object object, Game game){ + StackPane sp = new StackPane(); + Image in; + BackgroundImage bg = BG; + if(object instanceof Player){ + if(object.equals(game.getCurrentPlayer()) && game.getSelectedAction() instanceof Shot){ + in = PLAYER_SHOT_IMAGE; + } + else if(((Player) object).isShieldDeploy()){ + in = PLAYER_SHIELD_IMAGE; + } + else{ + in = PLAYER_IMAGE; + } + } else if(object instanceof EnergyBall){ + in = ENERGY_BALL_IMAGE; + } else if(object instanceof Bomb){ + in = BOMB_IMAGE; + } else if(object instanceof Mine){ + in = MINE_IMAGE; + } + else if(object instanceof Wall){ + in = WALL_IMAGE; + bg = null; + } + else{ + in = null; + } + + ImageView iv = new ImageView(in); + iv.setFitHeight(Window.cellSize); + iv.setFitWidth(Window.cellSize); + sp.getChildren().add(iv); + sp.setBackground(new Background(bg)); + return sp; + } + + public static Image getPlayerImage() { + return PLAYER_IMAGE; + } +} diff --git a/livraison/client/src/main/java/fr/lnl/game/client/view/Terminal.java b/livraison/client/src/main/java/fr/lnl/game/client/view/Terminal.java new file mode 100644 index 0000000..86dbbac --- /dev/null +++ b/livraison/client/src/main/java/fr/lnl/game/client/view/Terminal.java @@ -0,0 +1,113 @@ +package fr.lnl.game.client.view; + +import fr.lnl.game.server.games.Game; +import fr.lnl.game.server.games.action.*; +import fr.lnl.game.server.games.player.Player; +import fr.lnl.game.server.utils.Maths; + +import java.util.List; +import java.util.Scanner; + +/** + * View terminal, use standard input and output + */ +public class Terminal extends AbstractView { + + /** + * Standard input + */ + public static Scanner scanner; + + public Terminal(Game game, Player player) { + super(game, player); + } + + /** + * Used to update view + */ + public void show() { + System.out.println(game.getGrid().privateView(player)); + } + + /** + * Used to display the winner of the game + * @param winner the player who win the game, can be Null + */ + @Override + public void displayWinner(Player winner) { + System.out.println("\n\033[0;31m====== FIN DU JEU ======\033[0m"); + System.out.println(game.getGrid().toString()); + if(winner == null) { + System.out.println("\n\033[0;Partie nulle, personne n'a gagné la partie\033[0m"); + } else { + System.out.println("\n\033[0;33mVictoire de " + winner + " " + winner.getId() + "\033[0m"); + } + + } + + /** + * Used when current player is an instance of {@link fr.lnl.game.server.games.player.HumanPlayer} and demand to it + * an action to do + * @return chosen action + * @see Terminal#choseReunionSameAction(List) + */ + public Action choseAction() { + List actions = player.generateAvailableActions(); + List listActions = choseReunionSameAction(actions).getActions(); + Action action = null; + String error = "Veuillez renseigner une valeur numérique comprise entre 1 et " + listActions.size(); + do { + if(listActions.size() == 1){ + return listActions.get(0); + } + System.out.println("Choisissez la cible :"); + for (int i = 0; i < listActions.size(); i++) { + Action a = listActions.get(i); + if(a instanceof Move m){ + System.out.println(i + 1 + " : " + m.getDirection()); + } + else if(a instanceof DropObject o){ + System.out.println(i + 1 + " : " + o.getDirection()); + } + else if(a instanceof Shot s){ + System.out.println(i + 1 + " : " + s.getPoint()); + } + else{ + System.out.println(i + 1 + " : " + a.getClass().getSimpleName()); + } + } + String entry = scanner.next(); + int value = Maths.testInteger(entry, scanner, error); + if (value >= 1 && value <= listActions.size()) { + action = listActions.get(value - 1); + } + } while (action == null); + return action; + } + + /** + * Used when current player is an instance of {@link fr.lnl.game.server.games.player.HumanPlayer} and demand to it + * a type of action to do + * @param actions the list of actions possible + * @return the type of action to execute + * @see Terminal#choseAction() + */ + private ReunionSameAction choseReunionSameAction(List actions) { + ReunionSameAction reunion = null; + String error = "Veuillez renseigner une valeur numérique comprise entre 1 et " + actions.size(); + Scanner scanner = new Scanner(System.in); + do { + System.out.println("Choisissez une action :"); + for (int i = 0; i < actions.size(); i++) { + System.out.println(i + 1 + " : " + actions.get(i).getActionName()); + } + String entry = scanner.next(); + int value = Maths.testInteger(entry, scanner, error); + if (value >= 1 && value <= actions.size()) { + reunion = actions.get(value - 1); + } + }while (reunion == null) ; + return reunion; + } + +} diff --git a/livraison/client/src/main/java/fr/lnl/game/client/view/View.java b/livraison/client/src/main/java/fr/lnl/game/client/view/View.java new file mode 100644 index 0000000..3b22907 --- /dev/null +++ b/livraison/client/src/main/java/fr/lnl/game/client/view/View.java @@ -0,0 +1,20 @@ +package fr.lnl.game.client.view; + +import fr.lnl.game.server.games.player.Player; + +/** + * View interface, implemented by Terminal and Window. + */ +public interface View { + + /** + * used to update screen + */ + void show(); + + /** + * Used to display the name of the winner + * @param winner the player who win the game, can be Null + */ + void displayWinner(/* Nullable */ Player winner); +} diff --git a/livraison/client/src/main/java/fr/lnl/game/client/view/ViewManager.java b/livraison/client/src/main/java/fr/lnl/game/client/view/ViewManager.java new file mode 100644 index 0000000..326d185 --- /dev/null +++ b/livraison/client/src/main/java/fr/lnl/game/client/view/ViewManager.java @@ -0,0 +1,81 @@ +package fr.lnl.game.client.view; + +import fr.lnl.game.client.ClientPlayer; +import fr.lnl.game.client.ViewLambda; +import fr.lnl.game.client.listener.DisplayWinnerEvent; +import fr.lnl.game.server.games.Game; +import fr.lnl.game.server.games.player.HumanPlayer; +import fr.lnl.game.server.games.player.Player; + +import java.util.HashMap; +import java.util.Scanner; + +/** + * View manager, main access to every views + */ +public final class ViewManager { + + private final Game game; + private final Class viewType; + public HashMap players = new HashMap<>(); + + public ViewManager(Game game, Class viewType, ViewLambda lambda) { + this.game = game; + this.viewType = viewType; + for (Player player : game.getPlayers()) { + players.put(player, new ClientPlayer(player, lambda.createViewLambda(player))); + } + } + + /** + * Call when we need to change or update view + */ + public void updateView() { + players.get(game.getCurrentPlayer()).getView().show(); + } + + /** + * This method is call when the view is a terminal + */ + public void terminalView() { + Terminal.scanner = new Scanner(System.in); + DisplayWinnerEvent displayWinnerEvent = new DisplayWinnerEvent(); + while (true) { + Player player = game.getCurrentPlayer(); + System.out.println("\n\033[0;34m====== Tour n°" + game.getNbrTurn() + " =======\033[0m"); + System.out.println("\nA \033[0;31m" + player + " " + player.getId() + "\033[0m de jouer"); + players.get(game.getCurrentPlayer()).getView().show(); + if (game.getCurrentPlayer() instanceof HumanPlayer human) { + game.setSelectedAction(((Terminal) players.get(human).getView()).choseAction()); + } + boolean isOver = game.play(); + System.out.println("\n\033[0;31m" + player + " " + player.getId() + "\033[0m utilise l'action \033[0;36m" + + game.getSelectedAction().getClass().getSimpleName() + "\033[0m"); + if (isOver) { + displayWinnerEvent.updateModel(game.getWinner()); + Terminal.scanner.close(); + System.exit(0); + } + } + } + + /** + * This method is call when the game is finish + * @param winner The winner of the game, can be null + */ + public void displayWinner(Player winner) { + players.get(game.getCurrentPlayer()).getView().displayWinner(winner); + } + + /** + * This method is call after initialized view manager to display a first screen + */ + public void run() { + if (viewType == Terminal.class) { + terminalView(); + } else { + updateView(); + } + } + +} diff --git a/livraison/client/src/main/java/fr/lnl/game/client/view/Window.java b/livraison/client/src/main/java/fr/lnl/game/client/view/Window.java new file mode 100644 index 0000000..5bd2b02 --- /dev/null +++ b/livraison/client/src/main/java/fr/lnl/game/client/view/Window.java @@ -0,0 +1,302 @@ +package fr.lnl.game.client.view; + +import fr.lnl.game.client.App; +import fr.lnl.game.client.listener.ClientEventHandler; +import fr.lnl.game.client.listener.NextPlayerButtonListener; +import fr.lnl.game.client.listener.SelectActionButton; +import fr.lnl.game.client.listener.SelectDirectionListener; +import fr.lnl.game.server.games.Game; +import fr.lnl.game.server.games.action.*; +import fr.lnl.game.server.games.grid.Grid; +import fr.lnl.game.server.games.grid.elements.Box; +import fr.lnl.game.server.games.grid.elements.EnergyBall; +import fr.lnl.game.server.games.grid.elements.Explosive; +import fr.lnl.game.server.games.grid.elements.Wall; +import fr.lnl.game.server.games.player.HumanPlayer; +import fr.lnl.game.server.games.player.Player; +import fr.lnl.game.server.utils.Pair; +import fr.lnl.game.server.utils.Point; +import javafx.event.ActionEvent; +import javafx.event.EventHandler; +import javafx.geometry.Insets; +import javafx.scene.Parent; +import javafx.scene.Scene; +import javafx.scene.control.Alert; +import javafx.scene.control.Button; +import javafx.scene.layout.*; +import javafx.scene.paint.Color; +import javafx.scene.shape.Rectangle; +import javafx.scene.text.Text; +import javafx.stage.Stage; + +import java.util.List; + +/** + * Window view, use mouse and keyboard to control interface + */ +public class Window extends AbstractView { + + + // il faut pouvoir trouver une formule responsive avec width et height + public static final int cellSize = 40; + public static final int width = 500; + public static final int height = 160; + private static final Color dark = Color.valueOf("1F1F1F"); + private static final Background bg = new Background(new BackgroundFill(dark, CornerRadii.EMPTY, Insets.EMPTY)); + + + private final Stage stage; + private Pane buttonPane; + private ReunionSameAction selectedReunionAction = null; + private final NextPlayerButtonListener nextPlayerButtonListener = new NextPlayerButtonListener(game); + + + public Window(Stage stage, Game game, Player player) { + super(game, player); + this.stage = stage; + } + + /** + * used to update screen + */ + public void show() { + Scene scene = new Scene(createContent()); + stage.setScene(scene); + stage.setTitle("Game"); + stage.getIcons().add(Cell.getPlayerImage()); + stage.setResizable(false); + stage.sizeToScene(); + stage.show(); + } + + /** + * Used to display the name of the winner + * @param winner the player who win the game, can be Null + */ + @Override + public void displayWinner(Player winner) { + Alert alert = new Alert(Alert.AlertType.INFORMATION); + alert.setTitle("Fin du jeu"); + alert.setHeaderText("La partie est termin\u00E9"); + if(winner == null) { + alert.setContentText("La partie est nulle, personne n'a gagn\u00E9"); + } else { + alert.setContentText("Le joueur " + winner + " " + winner.getId() + " a gagn\u00E9"); + } + App.getViewManager().updateView(); + alert.showAndWait(); + } + + /** + * Choose a direction between all possible from the previously selected action type + * @param selectedReunionAction previously selected type of action + * @see Window#choseReunionSameAction(List) + */ + public void choseDirectionAction(ReunionSameAction selectedReunionAction) { + for(int i = 0; i < selectedReunionAction.getActions().size(); ++i) { + Action action = selectedReunionAction.getActions().get(i); + if(action instanceof Move m){ + addButtonToPane(m.getDirection().toString(), + new ClientEventHandler(new SelectDirectionListener(game, this, action)), buttonPane, + i * 100 + 50, 0); + } + else if(action instanceof DropObject o){ + addButtonToPane(o.getDirection().toString(), new ClientEventHandler(new SelectDirectionListener(game, this, action)), buttonPane, i * 100 + 50, 0); + } + else if(action instanceof Shot s){ + addButtonToPane(s.getPoint().toString(), new ClientEventHandler(new SelectDirectionListener(game, this, action)), buttonPane, i * 100 + 50, 0); + } + else{ + addButtonToPane(action.getClass().getSimpleName(), new ClientEventHandler(new SelectDirectionListener(game, this, action)), buttonPane, i * 100 + 50, 0); + } + } + } + + /** + * Used when {@link Game#getCurrentPlayer()} is an instance of {@link HumanPlayer}. + * Display button to demand to player to choose the type of action to execute + * @param actions the list of possible actions + * @see Window#choseDirectionAction(ReunionSameAction) + */ + private void choseReunionSameAction(List actions) { + for (int i = 0; i < actions.size(); i++) { + ReunionSameAction action = actions.get(i); + addButtonToPane(action.getActionName(), new ClientEventHandler(new SelectActionButton(game, this, action)), + buttonPane, i * 100 + 50, 0); + } + } + + /** + * called when we add a button in the interface + * @param content content of the button + * @param listener listener of the button + * @param pane pane where we add the button + * @param offsetX move the button from the base position of the pane to the left (when offsetX is negative) or on + * the right (when offsetY is positive) + * @param offsetY move the button from the base position of the pane to the up (when offsetX is negative) or on + * the down (when offsetY is positive) + */ + private void addButtonToPane(String content, EventHandler listener, Pane pane, int offsetX, int offsetY) { + Button button = new Button(content); + button.setOnAction(listener); + button.setPrefSize(85, 35); + button.setStyle("-fx-background-color: #a96806;"); + button.setTextFill(javafx.scene.paint.Color.WHITE); + button.setLayoutX(offsetX - button.getPrefWidth() / 2); + button.setLayoutY(offsetY); + pane.getChildren().add(button); + } + + + /** + * Create content of the stage + * @return the parent element to set to the stage + */ + private Parent createContent() { + Pane principalPane = new Pane(); + principalPane.setPrefSize(game.getGrid().getRow() * cellSize + width, game.getGrid().getColumn() * cellSize + height); // TODO: 04/12/2021 A corriger -> doit plutôt s'adapter à la taille de la grid (grid.getRow() et grid.getColumn()) + for (int i = 0; i < game.getGrid().getRow(); i++) { + for (int j = 0; j < game.getGrid().getColumn(); j++) { + Cell cell = new Cell(i, j); + principalPane.getChildren().add(cell); + } + } + Grid grid = game.getGrid(); + for (int i = 0; i < grid.getRow(); i++) { + for (int j = 0; j < grid.getColumn(); j++) { + Pair value = grid.getBoard().get(new Point(i, j)); + if (value.getB() instanceof Wall || value.getB() instanceof EnergyBall) { + addToPrincipalPanel(value.getB(), principalPane, i, j); + } + else if(value.getB() instanceof Explosive){ + if(((Explosive) value.getB()).getPlayer().equals(player)){ + addToPrincipalPanel(value.getB(), principalPane, i, j); + } + else{ + addToPrincipalPanel(null,principalPane, i, j); + } + } + else if (value.getA() != null) { + addToPrincipalPanel(value.getA(), principalPane, i, j); + } + else{ + addToPrincipalPanel(null,principalPane, i, j); + } + } + } + putStatePlayerPane(principalPane); + putMoveTextPane(principalPane); + this.buttonPane = new Pane(); + buttonPane.setLayoutX(0); + buttonPane.setLayoutY(600); + if(game.getCurrentPlayer() instanceof HumanPlayer) { + if(this.selectedReunionAction == null) { + choseReunionSameAction(player.generateAvailableActions()); + } else { + choseDirectionAction(selectedReunionAction); + } + } else { + addButtonToPane("SUIVANT", new ClientEventHandler(nextPlayerButtonListener), buttonPane, (int) (principalPane.getPrefWidth() / 2), 0); + } + + principalPane.getChildren().add(buttonPane); + principalPane.setBackground(bg); + return principalPane; + } + + /** + * Add grid element to the principal pane + * @param object object to add to the pane + * @param principalPane pane where we'll add the object + * @param i + * @param j + */ + public void addToPrincipalPanel(Object object, Pane principalPane, int i, int j) { + StackPane sp = Cell.setImageObject(object, game); + sp.setLayoutY(i * cellSize); + sp.setLayoutX(j * cellSize); + principalPane.getChildren().add(sp); + } + + /** + * Create the right pane + * @param principalPane principal pane where we'll add the left down pane + */ + public void putStatePlayerPane(Pane principalPane){ + int Y = 0; + for(int i=0;i + + + +All Classes and Interfaces (client API) + + + + + + + + + + + + + + +
+ +
+
+
+

All Classes and Interfaces

+
+
+
+
+
+
Class
+
Description
+ +
+
Abstract class implemented by every view classes
+
+ +
+
Application starting point
+
+ +
+
classe qui a pour but de générer chaque case de la grid et de vérifier les entités présentes dessus + (Mur, Joueur, Energie, Bombe, etc.)
+
+ +
+
implementation of a listener from JavaFX EventHandler
+
+ +
+
Store a view per player
+
+ +
+
Used to display the winner of the game
+
+ +
+
This method is call when the current player have selected an action to play (or if it's a computer player, will + select it), then we call Game.play() and we update the view
+
+ +
+
Used when the human player select type of action it want to play
+
+ +
+
Call when the player selected the direction where it wants to play it
+
+ +
+
View terminal, use standard input and output
+
+ +
+
View interface, implemented by Terminal and Window.
+
+ +
+
Used as Lambda expression to instantiate a View per Player stored in ClientPlayer
+
+ +
+
View manager, main access to every views
+
+ +
+
Window view, use mouse and keyboard to control interface
+
+
+
+
+
+
+
+ + diff --git a/livraison/doc/client/allpackages-index.html b/livraison/doc/client/allpackages-index.html new file mode 100644 index 0000000..d3f9478 --- /dev/null +++ b/livraison/doc/client/allpackages-index.html @@ -0,0 +1,73 @@ + + + + +All Packages (client API) + + + + + + + + + + + + + + +
+ +
+
+
+

All Packages

+
+
Package Summary
+
+
Package
+
Description
+ +
+
Client package
+
+ +
+
Package that contains every view listeners
+
+ +
+
View package, contains all classes about user view
+
+
+
+
+
+ + diff --git a/livraison/doc/client/client/fr/lnl/game/client/App.html b/livraison/doc/client/client/fr/lnl/game/client/App.html new file mode 100644 index 0000000..b2b544a --- /dev/null +++ b/livraison/doc/client/client/fr/lnl/game/client/App.html @@ -0,0 +1,369 @@ + + + + +App (client API) + + + + + + + + + + + + + + +
+ +
+
+ +
+
Module client
+ +

Class App

+
+
java.lang.Object +
javafx.application.Application +
fr.lnl.game.client.App
+
+
+
+
+
public class App +extends javafx.application.Application
+
Application starting point
+
+
+
    + +
  • +
    +

    Nested Class Summary

    +
    +

    Nested classes/interfaces inherited from class javafx.application.Application

    +javafx.application.Application.Parameters
    +
    +
  • + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    private static LinkedList<String>
    + +
     
    +
    private static fr.lnl.game.server.games.Game
    + +
     
    +
    private static ViewManager
    + +
     
    +
    +
    +

    Fields inherited from class javafx.application.Application

    +STYLESHEET_CASPIAN, STYLESHEET_MODENA
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    App()
    +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    private static fr.lnl.game.server.games.player.Player
    +
    createNewPlayer(Class<? extends fr.lnl.game.server.games.player.AbstractPlayer> playerClass, + fr.lnl.game.server.games.player.ClassPlayer playerType, + int playerListSize)
    +
    +
    create a new instance of the player
    +
    +
    static fr.lnl.game.server.games.Game
    + +
     
    + + +
     
    +
    static void
    + +
     
    +
    static void
    +
    main(String[] args)
    +
     
    +
    static List<fr.lnl.game.server.games.player.Player>
    + +
    +
    Parse players arguments and create instances for each player
    +
    +
    static Class<? extends AbstractView>
    + +
    +
    Parse the first argument given by user to know the view to use (Terminal or Window)
    +
    +
    void
    +
    start(javafx.stage.Stage stage)
    +
     
    +
    static void
    + +
    +
    Parse players arguments and create a new instance of Game
    +
    +
    +
    +
    +
    +

    Methods inherited from class javafx.application.Application

    +getHostServices, getParameters, getUserAgentStylesheet, init, launch, launch, notifyPreloader, setUserAgentStylesheet, stop
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+ +
+ +
+
+
+ + diff --git a/livraison/doc/client/client/fr/lnl/game/client/ClientPlayer.html b/livraison/doc/client/client/fr/lnl/game/client/ClientPlayer.html new file mode 100644 index 0000000..59c22ab --- /dev/null +++ b/livraison/doc/client/client/fr/lnl/game/client/ClientPlayer.html @@ -0,0 +1,312 @@ + + + + +ClientPlayer (client API) + + + + + + + + + + + + + + +
+ +
+
+ +
+
Module client
+ +

Record Class ClientPlayer

+
+
java.lang.Object +
java.lang.Record +
fr.lnl.game.client.ClientPlayer
+
+
+
+
+
public record ClientPlayer(fr.lnl.game.server.games.player.Player serverPlayer, View view) +extends Record
+
Store a view per player
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    private final fr.lnl.game.server.games.player.Player
    + +
    +
    The field for the serverPlayer record component.
    +
    +
    private final View
    + +
    +
    The field for the view record component.
    +
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    ClientPlayer(fr.lnl.game.server.games.player.Player serverPlayer, + View view)
    +
    +
    Creates an instance of a ClientPlayer record class.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    final boolean
    + +
    +
    Indicates whether some other object is "equal to" this one.
    +
    +
    fr.lnl.game.server.games.player.Player
    + +
     
    + + +
     
    +
    final int
    + +
    +
    Returns a hash code value for this object.
    +
    +
    fr.lnl.game.server.games.player.Player
    + +
    +
    Returns the value of the serverPlayer record component.
    +
    +
    final String
    + +
    +
    Returns a string representation of this record class.
    +
    + + +
    +
    Returns the value of the view record component.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      serverPlayer

      +
      private final fr.lnl.game.server.games.player.Player serverPlayer
      +
      The field for the serverPlayer record component.
      +
      +
    • +
    • +
      +

      view

      +
      private final View view
      +
      The field for the view record component.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ClientPlayer

      +
      public ClientPlayer(fr.lnl.game.server.games.player.Player serverPlayer, + View view)
      +
      Creates an instance of a ClientPlayer record class.
      +
      +
      Parameters:
      +
      serverPlayer - the value for the serverPlayer record component
      +
      view - the value for the view record component
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getServerPlayer

      +
      public fr.lnl.game.server.games.player.Player getServerPlayer()
      +
      +
    • +
    • +
      +

      getView

      +
      public View getView()
      +
      +
    • +
    • +
      +

      toString

      +
      public final String toString()
      +
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      +
      +
      Specified by:
      +
      toString in class Record
      +
      Returns:
      +
      a string representation of this object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public final int hashCode()
      +
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      +
      +
      Specified by:
      +
      hashCode in class Record
      +
      Returns:
      +
      a hash code value for this object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public final boolean equals(Object o)
      +
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      +
      +
      Specified by:
      +
      equals in class Record
      +
      Parameters:
      +
      o - the object with which to compare
      +
      Returns:
      +
      true if this object is the same as the o argument; false otherwise.
      +
      +
      +
    • +
    • +
      +

      serverPlayer

      +
      public fr.lnl.game.server.games.player.Player serverPlayer()
      +
      Returns the value of the serverPlayer record component.
      +
      +
      Returns:
      +
      the value of the serverPlayer record component
      +
      +
      +
    • +
    • +
      +

      view

      +
      public View view()
      +
      Returns the value of the view record component.
      +
      +
      Returns:
      +
      the value of the view record component
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/livraison/doc/client/client/fr/lnl/game/client/ViewLambda.html b/livraison/doc/client/client/fr/lnl/game/client/ViewLambda.html new file mode 100644 index 0000000..b635442 --- /dev/null +++ b/livraison/doc/client/client/fr/lnl/game/client/ViewLambda.html @@ -0,0 +1,139 @@ + + + + +ViewLambda (client API) + + + + + + + + + + + + + + +
+ +
+
+ +
+
Module client
+ +

Interface ViewLambda

+
+
+
+
Functional Interface:
+
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
+
+
+
@FunctionalInterface +public interface ViewLambda
+
Used as Lambda expression to instantiate a View per Player stored in ClientPlayer
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    + +
    createViewLambda(fr.lnl.game.server.games.player.Player player)
    +
    +
    A lambda create an anonymous class which implements this interface
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      createViewLambda

      +
      View createViewLambda(fr.lnl.game.server.games.player.Player player)
      +
      A lambda create an anonymous class which implements this interface
      +
      +
      Parameters:
      +
      player - an instance of Player to store in View
      +
      Returns:
      +
      an instance of view (depending on the first argument when launching the program)
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/livraison/doc/client/client/fr/lnl/game/client/listener/ClientEventHandler.html b/livraison/doc/client/client/fr/lnl/game/client/listener/ClientEventHandler.html new file mode 100644 index 0000000..d4d0dca --- /dev/null +++ b/livraison/doc/client/client/fr/lnl/game/client/listener/ClientEventHandler.html @@ -0,0 +1,286 @@ + + + + +ClientEventHandler (client API) + + + + + + + + + + + + + + +
+ +
+
+ +
+
Module client
+ +

Record Class ClientEventHandler

+
+
java.lang.Object +
java.lang.Record +
fr.lnl.game.client.listener.ClientEventHandler
+
+
+
+
+
All Implemented Interfaces:
+
EventListener, javafx.event.EventHandler<javafx.event.ActionEvent>
+
+
+
public record ClientEventHandler(fr.lnl.game.server.listener.ModelListener listener) +extends Record +implements javafx.event.EventHandler<javafx.event.ActionEvent>
+
implementation of a listener from JavaFX EventHandler
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    private final fr.lnl.game.server.listener.ModelListener
    + +
    +
    The field for the listener record component.
    +
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    ClientEventHandler(fr.lnl.game.server.listener.ModelListener listener)
    +
    +
    Creates an instance of a ClientEventHandler record class.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    final boolean
    + +
    +
    Indicates whether some other object is "equal to" this one.
    +
    +
    void
    +
    handle(javafx.event.ActionEvent event)
    +
    +
    This method is call by JavaFX when we click to the button
    +
    +
    final int
    + +
    +
    Returns a hash code value for this object.
    +
    +
    fr.lnl.game.server.listener.ModelListener
    + +
    +
    Returns the value of the listener record component.
    +
    +
    final String
    + +
    +
    Returns a string representation of this record class.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      listener

      +
      private final fr.lnl.game.server.listener.ModelListener listener
      +
      The field for the listener record component.
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ClientEventHandler

      +
      public ClientEventHandler(fr.lnl.game.server.listener.ModelListener listener)
      +
      Creates an instance of a ClientEventHandler record class.
      +
      +
      Parameters:
      +
      listener - the value for the listener record component
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      handle

      +
      public void handle(javafx.event.ActionEvent event)
      +
      This method is call by JavaFX when we click to the button
      +
      +
      Specified by:
      +
      handle in interface javafx.event.EventHandler<javafx.event.ActionEvent>
      +
      Parameters:
      +
      event - event class created when clicking on the element
      +
      +
      +
    • +
    • +
      +

      toString

      +
      public final String toString()
      +
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      +
      +
      Specified by:
      +
      toString in class Record
      +
      Returns:
      +
      a string representation of this object
      +
      +
      +
    • +
    • +
      +

      hashCode

      +
      public final int hashCode()
      +
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      +
      +
      Specified by:
      +
      hashCode in class Record
      +
      Returns:
      +
      a hash code value for this object
      +
      +
      +
    • +
    • +
      +

      equals

      +
      public final boolean equals(Object o)
      +
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      +
      +
      Specified by:
      +
      equals in class Record
      +
      Parameters:
      +
      o - the object with which to compare
      +
      Returns:
      +
      true if this object is the same as the o argument; false otherwise.
      +
      +
      +
    • +
    • +
      +

      listener

      +
      public fr.lnl.game.server.listener.ModelListener listener()
      +
      Returns the value of the listener record component.
      +
      +
      Returns:
      +
      the value of the listener record component
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/livraison/doc/client/client/fr/lnl/game/client/listener/DisplayWinnerEvent.html b/livraison/doc/client/client/fr/lnl/game/client/listener/DisplayWinnerEvent.html new file mode 100644 index 0000000..f4946c3 --- /dev/null +++ b/livraison/doc/client/client/fr/lnl/game/client/listener/DisplayWinnerEvent.html @@ -0,0 +1,184 @@ + + + + +DisplayWinnerEvent (client API) + + + + + + + + + + + + + + +
+ +
+
+ +
+
Module client
+ +

Class DisplayWinnerEvent

+
+
java.lang.Object +
fr.lnl.game.server.listener.AbstractModelListening +
fr.lnl.game.client.listener.DisplayWinnerEvent
+
+
+
+
+
All Implemented Interfaces:
+
fr.lnl.game.server.listener.ModelListener
+
+
+
public class DisplayWinnerEvent +extends fr.lnl.game.server.listener.AbstractModelListening
+
Used to display the winner of the game
+
+
+
    + +
  • +
    +

    Field Summary

    +
    +

    Fields inherited from class fr.lnl.game.server.listener.AbstractModelListening

    +listeners
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    This method is call when the game is over
    +
    +
    +
    +
    +
    +

    Methods inherited from class fr.lnl.game.server.listener.AbstractModelListening

    +addListener, fireChange, removalListener
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      DisplayWinnerEvent

      +
      public DisplayWinnerEvent()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      updateModel

      +
      public void updateModel(Object obj)
      +
      This method is call when the game is over
      +
      +
      Parameters:
      +
      obj - contains the winner of the game, can be null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/livraison/doc/client/client/fr/lnl/game/client/listener/NextPlayerButtonListener.html b/livraison/doc/client/client/fr/lnl/game/client/listener/NextPlayerButtonListener.html new file mode 100644 index 0000000..f9e6e82 --- /dev/null +++ b/livraison/doc/client/client/fr/lnl/game/client/listener/NextPlayerButtonListener.html @@ -0,0 +1,215 @@ + + + + +NextPlayerButtonListener (client API) + + + + + + + + + + + + + + +
+ +
+
+ +
+
Module client
+ +

Class NextPlayerButtonListener

+
+
java.lang.Object +
fr.lnl.game.server.listener.AbstractModelListening +
fr.lnl.game.client.listener.NextPlayerButtonListener
+
+
+
+
+
All Implemented Interfaces:
+
fr.lnl.game.server.listener.ModelListener
+
+
+
public class NextPlayerButtonListener +extends fr.lnl.game.server.listener.AbstractModelListening
+
This method is call when the current player have selected an action to play (or if it's a computer player, will + select it), then we call Game.play() and we update the view
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    private final DisplayWinnerEvent
    + +
     
    +
    private final fr.lnl.game.server.games.Game
    + +
     
    +
    +
    +

    Fields inherited from class fr.lnl.game.server.listener.AbstractModelListening

    +listeners
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    NextPlayerButtonListener(fr.lnl.game.server.games.Game game)
    +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    Call when clicking on "SUIVANT" button if current player is a computer player or after the human player selected + action it want to play
    +
    +
    +
    +
    +
    +

    Methods inherited from class fr.lnl.game.server.listener.AbstractModelListening

    +addListener, fireChange, removalListener
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      game

      +
      private final fr.lnl.game.server.games.Game game
      +
      +
    • +
    • +
      +

      displayWinnerEvent

      +
      private final DisplayWinnerEvent displayWinnerEvent
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      NextPlayerButtonListener

      +
      public NextPlayerButtonListener(fr.lnl.game.server.games.Game game)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      updateModel

      +
      public void updateModel(Object event)
      +
      Call when clicking on "SUIVANT" button if current player is a computer player or after the human player selected + action it want to play
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/livraison/doc/client/client/fr/lnl/game/client/listener/SelectActionButton.html b/livraison/doc/client/client/fr/lnl/game/client/listener/SelectActionButton.html new file mode 100644 index 0000000..59814a4 --- /dev/null +++ b/livraison/doc/client/client/fr/lnl/game/client/listener/SelectActionButton.html @@ -0,0 +1,229 @@ + + + + +SelectActionButton (client API) + + + + + + + + + + + + + + +
+ +
+
+ +
+
Module client
+ +

Class SelectActionButton

+
+
java.lang.Object +
fr.lnl.game.server.listener.AbstractModelListening +
fr.lnl.game.client.listener.SelectActionButton
+
+
+
+
+
All Implemented Interfaces:
+
fr.lnl.game.server.listener.ModelListener
+
+
+
public class SelectActionButton +extends fr.lnl.game.server.listener.AbstractModelListening
+
Used when the human player select type of action it want to play
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    private final fr.lnl.game.server.games.Game
    + +
     
    +
    private final fr.lnl.game.server.games.action.ReunionSameAction
    + +
     
    +
    private final Window
    + +
     
    +
    +
    +

    Fields inherited from class fr.lnl.game.server.listener.AbstractModelListening

    +listeners
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    SelectActionButton(fr.lnl.game.server.games.Game game, + Window window, + fr.lnl.game.server.games.action.ReunionSameAction reunionSameAction)
    +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    This method is call when the player select the type of action it want to play
    +
    +
    +
    +
    +
    +

    Methods inherited from class fr.lnl.game.server.listener.AbstractModelListening

    +addListener, fireChange, removalListener
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      window

      +
      private final Window window
      +
      +
    • +
    • +
      +

      reunionSameAction

      +
      private final fr.lnl.game.server.games.action.ReunionSameAction reunionSameAction
      +
      +
    • +
    • +
      +

      game

      +
      private final fr.lnl.game.server.games.Game game
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SelectActionButton

      +
      public SelectActionButton(fr.lnl.game.server.games.Game game, + Window window, + fr.lnl.game.server.games.action.ReunionSameAction reunionSameAction)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      updateModel

      +
      public void updateModel(Object obj)
      +
      This method is call when the player select the type of action it want to play
      +
      +
      Parameters:
      +
      obj - contain information about the event like the button where the player clicked
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/livraison/doc/client/client/fr/lnl/game/client/listener/SelectDirectionListener.html b/livraison/doc/client/client/fr/lnl/game/client/listener/SelectDirectionListener.html new file mode 100644 index 0000000..8a28142 --- /dev/null +++ b/livraison/doc/client/client/fr/lnl/game/client/listener/SelectDirectionListener.html @@ -0,0 +1,229 @@ + + + + +SelectDirectionListener (client API) + + + + + + + + + + + + + + +
+ +
+
+ +
+
Module client
+ +

Class SelectDirectionListener

+
+
java.lang.Object +
fr.lnl.game.server.listener.AbstractModelListening +
fr.lnl.game.client.listener.SelectDirectionListener
+
+
+
+
+
All Implemented Interfaces:
+
fr.lnl.game.server.listener.ModelListener
+
+
+
public class SelectDirectionListener +extends fr.lnl.game.server.listener.AbstractModelListening
+
Call when the player selected the direction where it wants to play it
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    private final fr.lnl.game.server.games.action.Action
    + +
     
    +
    private final fr.lnl.game.server.games.Game
    + +
     
    +
    private final Window
    + +
     
    +
    +
    +

    Fields inherited from class fr.lnl.game.server.listener.AbstractModelListening

    +listeners
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    SelectDirectionListener(fr.lnl.game.server.games.Game game, + Window window, + fr.lnl.game.server.games.action.Action action)
    +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    + +
    +
    This method is call when the player click on the button to select the direction of the previously selected action
    +
    +
    +
    +
    +
    +

    Methods inherited from class fr.lnl.game.server.listener.AbstractModelListening

    +addListener, fireChange, removalListener
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      game

      +
      private final fr.lnl.game.server.games.Game game
      +
      +
    • +
    • +
      +

      action

      +
      private final fr.lnl.game.server.games.action.Action action
      +
      +
    • +
    • +
      +

      window

      +
      private final Window window
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      SelectDirectionListener

      +
      public SelectDirectionListener(fr.lnl.game.server.games.Game game, + Window window, + fr.lnl.game.server.games.action.Action action)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      updateModel

      +
      public void updateModel(Object obj)
      +
      This method is call when the player click on the button to select the direction of the previously selected action
      +
      +
      Parameters:
      +
      obj - contain information about the event like the button where the player clicked
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/livraison/doc/client/client/fr/lnl/game/client/listener/package-summary.html b/livraison/doc/client/client/fr/lnl/game/client/listener/package-summary.html new file mode 100644 index 0000000..b835b7e --- /dev/null +++ b/livraison/doc/client/client/fr/lnl/game/client/listener/package-summary.html @@ -0,0 +1,127 @@ + + + + +fr.lnl.game.client.listener (client API) + + + + + + + + + + + + + + +
+ +
+
+
+
Module client
+

Package fr.lnl.game.client.listener

+
+
+
package fr.lnl.game.client.listener
+
+
Package that contains every view listeners
+
+
+
    +
  • + +
  • +
  • +
    +
    +
    +
    +
    Class
    +
    Description
    + +
    +
    implementation of a listener from JavaFX EventHandler
    +
    + +
    +
    Used to display the winner of the game
    +
    + +
    +
    This method is call when the current player have selected an action to play (or if it's a computer player, will + select it), then we call Game.play() and we update the view
    +
    + +
    +
    Used when the human player select type of action it want to play
    +
    + +
    +
    Call when the player selected the direction where it wants to play it
    +
    +
    +
    +
    +
  • +
+
+
+
+
+ + diff --git a/livraison/doc/client/client/fr/lnl/game/client/listener/package-tree.html b/livraison/doc/client/client/fr/lnl/game/client/listener/package-tree.html new file mode 100644 index 0000000..65ce871 --- /dev/null +++ b/livraison/doc/client/client/fr/lnl/game/client/listener/package-tree.html @@ -0,0 +1,82 @@ + + + + +fr.lnl.game.client.listener Class Hierarchy (client API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package fr.lnl.game.client.listener

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ + diff --git a/livraison/doc/client/client/fr/lnl/game/client/package-summary.html b/livraison/doc/client/client/fr/lnl/game/client/package-summary.html new file mode 100644 index 0000000..38d83df --- /dev/null +++ b/livraison/doc/client/client/fr/lnl/game/client/package-summary.html @@ -0,0 +1,118 @@ + + + + +fr.lnl.game.client (client API) + + + + + + + + + + + + + + +
+ +
+
+
+
Module client
+

Package fr.lnl.game.client

+
+
+
package fr.lnl.game.client
+
+
Client package
+
+
+
    +
  • + +
  • +
  • +
    +
    +
    +
    +
    Class
    +
    Description
    + +
    +
    Application starting point
    +
    + +
    +
    Store a view per player
    +
    + +
    +
    Used as Lambda expression to instantiate a View per Player stored in ClientPlayer
    +
    +
    +
    +
    +
  • +
+
+
+
+
+ + diff --git a/livraison/doc/client/client/fr/lnl/game/client/package-tree.html b/livraison/doc/client/client/fr/lnl/game/client/package-tree.html new file mode 100644 index 0000000..7da0529 --- /dev/null +++ b/livraison/doc/client/client/fr/lnl/game/client/package-tree.html @@ -0,0 +1,85 @@ + + + + +fr.lnl.game.client Class Hierarchy (client API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package fr.lnl.game.client

+Package Hierarchies: + +
+
+

Class Hierarchy

+
    +
  • java.lang.Object +
      +
    • javafx.application.Application +
        +
      • fr.lnl.game.client.App
      • +
      +
    • +
    • java.lang.Record + +
    • +
    +
  • +
+
+
+

Interface Hierarchy

+ +
+
+
+
+ + diff --git a/livraison/doc/client/client/fr/lnl/game/client/view/AbstractView.html b/livraison/doc/client/client/fr/lnl/game/client/view/AbstractView.html new file mode 100644 index 0000000..e369c3a --- /dev/null +++ b/livraison/doc/client/client/fr/lnl/game/client/view/AbstractView.html @@ -0,0 +1,180 @@ + + + + +AbstractView (client API) + + + + + + + + + + + + + + +
+ +
+
+ +
+
Module client
+ +

Class AbstractView

+
+
java.lang.Object +
fr.lnl.game.client.view.AbstractView
+
+
+
+
All Implemented Interfaces:
+
View
+
+
+
Direct Known Subclasses:
+
Terminal, Window
+
+
+
public abstract class AbstractView +extends Object +implements View
+
Abstract class implemented by every view classes
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    protected fr.lnl.game.server.games.Game
    + +
     
    +
    protected final fr.lnl.game.server.games.player.Player
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    AbstractView(fr.lnl.game.server.games.Game game, + fr.lnl.game.server.games.player.Player player)
    +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +

    Methods inherited from interface fr.lnl.game.client.view.View

    +displayWinner, show
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      player

      +
      protected final fr.lnl.game.server.games.player.Player player
      +
      +
    • +
    • +
      +

      game

      +
      protected fr.lnl.game.server.games.Game game
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      AbstractView

      +
      public AbstractView(fr.lnl.game.server.games.Game game, + fr.lnl.game.server.games.player.Player player)
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/livraison/doc/client/client/fr/lnl/game/client/view/Cell.html b/livraison/doc/client/client/fr/lnl/game/client/view/Cell.html new file mode 100644 index 0000000..79b0fe3 --- /dev/null +++ b/livraison/doc/client/client/fr/lnl/game/client/view/Cell.html @@ -0,0 +1,320 @@ + + + + +Cell (client API) + + + + + + + + + + + + + + +
+ +
+
+ +
+
Module client
+ +

Class Cell

+
+
java.lang.Object +
javafx.scene.Node +
javafx.scene.shape.Shape +
javafx.scene.shape.Rectangle +
fr.lnl.game.client.view.Cell
+
+
+
+
+
+
+
All Implemented Interfaces:
+
javafx.css.Styleable, javafx.event.EventTarget
+
+
+
public class Cell +extends javafx.scene.shape.Rectangle
+
classe qui a pour but de générer chaque case de la grid et de vérifier les entités présentes dessus + (Mur, Joueur, Energie, Bombe, etc.)
+
+
+
    + +
  • +
    +

    Property Summary

    +
    +

    Properties inherited from class javafx.scene.shape.Rectangle

    +arcHeight, arcWidth, height, width, x, y
    +
    +

    Properties inherited from class javafx.scene.shape.Shape

    +fill, smooth, strokeDashOffset, strokeLineCap, strokeLineJoin, strokeMiterLimit, stroke, strokeType, strokeWidth
    +
    +

    Properties inherited from class javafx.scene.Node

    +accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
    +
    +
  • + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    private static final javafx.scene.image.Image
    + +
     
    +
    private static final javafx.scene.layout.BackgroundImage
    + +
     
    +
    private static final javafx.scene.image.Image
    + +
     
    +
    private static final javafx.scene.image.Image
    + +
     
    +
    private static final javafx.scene.image.Image
    + +
     
    +
    private static final javafx.scene.image.Image
    + +
     
    +
    private static final javafx.scene.image.Image
    + +
     
    +
    private static final javafx.scene.image.Image
    + +
     
    +
    private static final javafx.scene.image.Image
    + +
     
    +
    +
    +

    Fields inherited from class javafx.scene.Node

    +BASELINE_OFFSET_SAME_AS_HEIGHT
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    Cell(int x, + int y)
    +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    static javafx.scene.image.Image
    + +
     
    +
    static javafx.scene.layout.StackPane
    +
    setImageObject(Object object, + fr.lnl.game.server.games.Game game)
    +
     
    +
    +
    +
    +
    +

    Methods inherited from class javafx.scene.shape.Rectangle

    +arcHeightProperty, arcWidthProperty, getArcHeight, getArcWidth, getClassCssMetaData, getCssMetaData, getHeight, getWidth, getX, getY, heightProperty, setArcHeight, setArcWidth, setHeight, setWidth, setX, setY, toString, widthProperty, xProperty, yProperty
    +
    +

    Methods inherited from class javafx.scene.shape.Shape

    +fillProperty, getFill, getStroke, getStrokeDashArray, getStrokeDashOffset, getStrokeLineCap, getStrokeLineJoin, getStrokeMiterLimit, getStrokeType, getStrokeWidth, intersect, isSmooth, setFill, setSmooth, setStroke, setStrokeDashOffset, setStrokeLineCap, setStrokeLineJoin, setStrokeMiterLimit, setStrokeType, setStrokeWidth, smoothProperty, strokeDashOffsetProperty, strokeLineCapProperty, strokeLineJoinProperty, strokeMiterLimitProperty, strokeProperty, strokeTypeProperty, strokeWidthProperty, subtract, union
    +
    +

    Methods inherited from class javafx.scene.Node

    +accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBaselineOffset, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInitialFocusTraversable, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isResizable, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookup, lookupAll, managedProperty, maxHeight, maxWidth, minHeight, minWidth, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, prefHeight, prefWidth, pressedProperty, pseudoClassStateChanged, queryAccessibleAttribute, relocate, removeEventFilter, removeEventHandler, requestFocus, resize, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    +
    +

    Methods inherited from interface javafx.css.Styleable

    +getStyleableNode
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      PLAYER_IMAGE

      +
      private static final javafx.scene.image.Image PLAYER_IMAGE
      +
      +
    • +
    • +
      +

      PLAYER_SHIELD_IMAGE

      +
      private static final javafx.scene.image.Image PLAYER_SHIELD_IMAGE
      +
      +
    • +
    • +
      +

      PLAYER_SHOT_IMAGE

      +
      private static final javafx.scene.image.Image PLAYER_SHOT_IMAGE
      +
      +
    • +
    • +
      +

      ENERGY_BALL_IMAGE

      +
      private static final javafx.scene.image.Image ENERGY_BALL_IMAGE
      +
      +
    • +
    • +
      +

      BOMB_IMAGE

      +
      private static final javafx.scene.image.Image BOMB_IMAGE
      +
      +
    • +
    • +
      +

      MINE_IMAGE

      +
      private static final javafx.scene.image.Image MINE_IMAGE
      +
      +
    • +
    • +
      +

      WALL_IMAGE

      +
      private static final javafx.scene.image.Image WALL_IMAGE
      +
      +
    • +
    • +
      +

      BACKGROUND_IMAGE

      +
      private static final javafx.scene.image.Image BACKGROUND_IMAGE
      +
      +
    • +
    • +
      +

      BG

      +
      private static final javafx.scene.layout.BackgroundImage BG
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Cell

      +
      public Cell(int x, + int y)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      setImageObject

      +
      public static javafx.scene.layout.StackPane setImageObject(Object object, + fr.lnl.game.server.games.Game game)
      +
      +
      Parameters:
      +
      object - the object we'll define the type
      +
      Returns:
      +
      a pane which contains an image depending on the type of the object
      +
      +
      +
    • +
    • +
      +

      getPlayerImage

      +
      public static javafx.scene.image.Image getPlayerImage()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/livraison/doc/client/client/fr/lnl/game/client/view/Terminal.html b/livraison/doc/client/client/fr/lnl/game/client/view/Terminal.html new file mode 100644 index 0000000..a745c61 --- /dev/null +++ b/livraison/doc/client/client/fr/lnl/game/client/view/Terminal.html @@ -0,0 +1,271 @@ + + + + +Terminal (client API) + + + + + + + + + + + + + + +
+ +
+
+ +
+
Module client
+ +

Class Terminal

+
+
java.lang.Object +
fr.lnl.game.client.view.AbstractView +
fr.lnl.game.client.view.Terminal
+
+
+
+
+
All Implemented Interfaces:
+
View
+
+
+
public class Terminal +extends AbstractView
+
View terminal, use standard input and output
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    static Scanner
    + +
    +
    Standard input
    +
    +
    +
    +

    Fields inherited from class fr.lnl.game.client.view.AbstractView

    +game, player
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    Terminal(fr.lnl.game.server.games.Game game, + fr.lnl.game.server.games.player.Player player)
    +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    fr.lnl.game.server.games.action.Action
    + +
    +
    Used when current player is an instance of HumanPlayer and demand to it + an action to do
    +
    +
    private fr.lnl.game.server.games.action.ReunionSameAction
    +
    choseReunionSameAction(List<fr.lnl.game.server.games.action.ReunionSameAction> actions)
    +
    +
    Used when current player is an instance of HumanPlayer and demand to it + a type of action to do
    +
    +
    void
    +
    displayWinner(fr.lnl.game.server.games.player.Player winner)
    +
    +
    Used to display the winner of the game
    +
    +
    void
    + +
    +
    Used to update view
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      scanner

      +
      public static Scanner scanner
      +
      Standard input
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Terminal

      +
      public Terminal(fr.lnl.game.server.games.Game game, + fr.lnl.game.server.games.player.Player player)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      show

      +
      public void show()
      +
      Used to update view
      +
      +
    • +
    • +
      +

      displayWinner

      +
      public void displayWinner(fr.lnl.game.server.games.player.Player winner)
      +
      Used to display the winner of the game
      +
      +
      Parameters:
      +
      winner - the player who win the game, can be Null
      +
      +
      +
    • +
    • +
      +

      choseAction

      +
      public fr.lnl.game.server.games.action.Action choseAction()
      +
      Used when current player is an instance of HumanPlayer and demand to it + an action to do
      +
      +
      Returns:
      +
      chosen action
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      choseReunionSameAction

      +
      private fr.lnl.game.server.games.action.ReunionSameAction choseReunionSameAction(List<fr.lnl.game.server.games.action.ReunionSameAction> actions)
      +
      Used when current player is an instance of HumanPlayer and demand to it + a type of action to do
      +
      +
      Parameters:
      +
      actions - the list of actions possible
      +
      Returns:
      +
      the type of action to execute
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/livraison/doc/client/client/fr/lnl/game/client/view/View.html b/livraison/doc/client/client/fr/lnl/game/client/view/View.html new file mode 100644 index 0000000..a56c6ce --- /dev/null +++ b/livraison/doc/client/client/fr/lnl/game/client/view/View.html @@ -0,0 +1,148 @@ + + + + +View (client API) + + + + + + + + + + + + + + +
+ +
+
+ +
+
Module client
+ +

Interface View

+
+
+
+
All Known Implementing Classes:
+
AbstractView, Terminal, Window
+
+
+
public interface View
+
View interface, implemented by Terminal and Window.
+
+
+
    + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    displayWinner(fr.lnl.game.server.games.player.Player winner)
    +
    +
    Used to display the name of the winner
    +
    +
    void
    + +
    +
    used to update screen
    +
    +
    +
    +
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      show

      +
      void show()
      +
      used to update screen
      +
      +
    • +
    • +
      +

      displayWinner

      +
      void displayWinner(fr.lnl.game.server.games.player.Player winner)
      +
      Used to display the name of the winner
      +
      +
      Parameters:
      +
      winner - the player who win the game, can be Null
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/livraison/doc/client/client/fr/lnl/game/client/view/ViewManager.html b/livraison/doc/client/client/fr/lnl/game/client/view/ViewManager.html new file mode 100644 index 0000000..2a17581 --- /dev/null +++ b/livraison/doc/client/client/fr/lnl/game/client/view/ViewManager.html @@ -0,0 +1,253 @@ + + + + +ViewManager (client API) + + + + + + + + + + + + + + +
+ +
+
+ +
+
Module client
+ +

Class ViewManager

+
+
java.lang.Object +
fr.lnl.game.client.view.ViewManager
+
+
+
+
public final class ViewManager +extends Object
+
View manager, main access to every views
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    private final fr.lnl.game.server.games.Game
    + +
     
    +
    HashMap<fr.lnl.game.server.games.player.Player,ClientPlayer>
    + +
     
    +
    private final Class<? extends View>
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    ViewManager(fr.lnl.game.server.games.Game game, + Class<? extends View> viewType, + ViewLambda lambda)
    +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    void
    +
    displayWinner(fr.lnl.game.server.games.player.Player winner)
    +
    +
    This method is call when the game is finish
    +
    +
    void
    +
    run()
    +
    +
    This method is call after initialized view manager to display a first screen
    +
    +
    void
    + +
    +
    This method is call when the view is a terminal
    +
    +
    void
    + +
    +
    Call when we need to change or update view
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      game

      +
      private final fr.lnl.game.server.games.Game game
      +
      +
    • +
    • +
      +

      viewType

      +
      private final Class<? extends View> viewType
      +
      +
    • +
    • +
      +

      players

      +
      public HashMap<fr.lnl.game.server.games.player.Player,ClientPlayer> players
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      ViewManager

      +
      public ViewManager(fr.lnl.game.server.games.Game game, + Class<? extends View> viewType, + ViewLambda lambda)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      updateView

      +
      public void updateView()
      +
      Call when we need to change or update view
      +
      +
    • +
    • +
      +

      terminalView

      +
      public void terminalView()
      +
      This method is call when the view is a terminal
      +
      +
    • +
    • +
      +

      displayWinner

      +
      public void displayWinner(fr.lnl.game.server.games.player.Player winner)
      +
      This method is call when the game is finish
      +
      +
      Parameters:
      +
      winner - The winner of the game, can be null
      +
      +
      +
    • +
    • +
      +

      run

      +
      public void run()
      +
      This method is call after initialized view manager to display a first screen
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/livraison/doc/client/client/fr/lnl/game/client/view/Window.html b/livraison/doc/client/client/fr/lnl/game/client/view/Window.html new file mode 100644 index 0000000..9cf3d96 --- /dev/null +++ b/livraison/doc/client/client/fr/lnl/game/client/view/Window.html @@ -0,0 +1,518 @@ + + + + +Window (client API) + + + + + + + + + + + + + + +
+ +
+
+ +
+
Module client
+ +

Class Window

+
+
java.lang.Object +
fr.lnl.game.client.view.AbstractView +
fr.lnl.game.client.view.Window
+
+
+
+
+
All Implemented Interfaces:
+
View
+
+
+
public class Window +extends AbstractView
+
Window view, use mouse and keyboard to control interface
+
+
+
    + +
  • +
    +

    Field Summary

    +
    Fields
    +
    +
    Modifier and Type
    +
    Field
    +
    Description
    +
    private static final javafx.scene.layout.Background
    + +
     
    +
    private javafx.scene.layout.Pane
    + +
     
    +
    static final int
    + +
     
    +
    private static final javafx.scene.paint.Color
    + +
     
    +
    static final int
    + +
     
    + + +
     
    +
    private fr.lnl.game.server.games.action.ReunionSameAction
    + +
     
    +
    private final javafx.stage.Stage
    + +
     
    +
    static final int
    + +
     
    +
    +
    +

    Fields inherited from class fr.lnl.game.client.view.AbstractView

    +game, player
    +
    +
  • + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    Window(javafx.stage.Stage stage, + fr.lnl.game.server.games.Game game, + fr.lnl.game.server.games.player.Player player)
    +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    private void
    +
    addButtonToPane(String content, + javafx.event.EventHandler<javafx.event.ActionEvent> listener, + javafx.scene.layout.Pane pane, + int offsetX, + int offsetY)
    +
    +
    called when we add a button in the interface
    +
    +
    void
    +
    addToPrincipalPanel(Object object, + javafx.scene.layout.Pane principalPane, + int i, + int j)
    +
    +
    Add grid element to the principal pane
    +
    +
    void
    +
    choseDirectionAction(fr.lnl.game.server.games.action.ReunionSameAction selectedReunionAction)
    +
    +
    Choose a direction between all possible from the previously selected action type
    +
    +
    private void
    +
    choseReunionSameAction(List<fr.lnl.game.server.games.action.ReunionSameAction> actions)
    +
    +
    Used when Game.getCurrentPlayer() is an instance of HumanPlayer.
    +
    +
    private javafx.scene.Parent
    + +
    +
    Create content of the stage
    +
    +
    void
    +
    displayWinner(fr.lnl.game.server.games.player.Player winner)
    +
    +
    Used to display the name of the winner
    +
    + + +
     
    +
    void
    +
    putMoveTextPane(javafx.scene.layout.Pane principalPane)
    +
    +
    build left down pane and move it to its position
    +
    +
    void
    +
    putStatePlayerPane(javafx.scene.layout.Pane principalPane)
    +
    +
    Create the right pane
    +
    +
    void
    +
    setSelectedReunionAction(fr.lnl.game.server.games.action.ReunionSameAction selectedReunionAction)
    +
     
    +
    void
    + +
    +
    used to update screen
    +
    +
    javafx.scene.layout.StackPane
    + +
    +
    Build the left down pane (contains current player information)
    +
    +
    javafx.scene.layout.StackPane
    +
    showStatePlayer(String type, + int playerNumber)
    +
    +
    Build left down pane (list all players information)
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Field Details

    +
      +
    • +
      +

      cellSize

      +
      public static final int cellSize
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      width

      +
      public static final int width
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      height

      +
      public static final int height
      +
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      dark

      +
      private static final javafx.scene.paint.Color dark
      +
      +
    • +
    • +
      +

      bg

      +
      private static final javafx.scene.layout.Background bg
      +
      +
    • +
    • +
      +

      stage

      +
      private final javafx.stage.Stage stage
      +
      +
    • +
    • +
      +

      buttonPane

      +
      private javafx.scene.layout.Pane buttonPane
      +
      +
    • +
    • +
      +

      selectedReunionAction

      +
      private fr.lnl.game.server.games.action.ReunionSameAction selectedReunionAction
      +
      +
    • +
    • +
      +

      nextPlayerButtonListener

      +
      private final NextPlayerButtonListener nextPlayerButtonListener
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Window

      +
      public Window(javafx.stage.Stage stage, + fr.lnl.game.server.games.Game game, + fr.lnl.game.server.games.player.Player player)
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      show

      +
      public void show()
      +
      used to update screen
      +
      +
    • +
    • +
      +

      displayWinner

      +
      public void displayWinner(fr.lnl.game.server.games.player.Player winner)
      +
      Used to display the name of the winner
      +
      +
      Parameters:
      +
      winner - the player who win the game, can be Null
      +
      +
      +
    • +
    • +
      +

      choseDirectionAction

      +
      public void choseDirectionAction(fr.lnl.game.server.games.action.ReunionSameAction selectedReunionAction)
      +
      Choose a direction between all possible from the previously selected action type
      +
      +
      Parameters:
      +
      selectedReunionAction - previously selected type of action
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      choseReunionSameAction

      +
      private void choseReunionSameAction(List<fr.lnl.game.server.games.action.ReunionSameAction> actions)
      +
      Used when Game.getCurrentPlayer() is an instance of HumanPlayer. + Display button to demand to player to choose the type of action to execute
      +
      +
      Parameters:
      +
      actions - the list of possible actions
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      addButtonToPane

      +
      private void addButtonToPane(String content, + javafx.event.EventHandler<javafx.event.ActionEvent> listener, + javafx.scene.layout.Pane pane, + int offsetX, + int offsetY)
      +
      called when we add a button in the interface
      +
      +
      Parameters:
      +
      content - content of the button
      +
      listener - listener of the button
      +
      pane - pane where we add the button
      +
      offsetX - move the button from the base position of the pane to the left (when offsetX is negative) or on + the right (when offsetY is positive)
      +
      offsetY - move the button from the base position of the pane to the up (when offsetX is negative) or on + the down (when offsetY is positive)
      +
      +
      +
    • +
    • +
      +

      createContent

      +
      private javafx.scene.Parent createContent()
      +
      Create content of the stage
      +
      +
      Returns:
      +
      the parent element to set to the stage
      +
      +
      +
    • +
    • +
      +

      addToPrincipalPanel

      +
      public void addToPrincipalPanel(Object object, + javafx.scene.layout.Pane principalPane, + int i, + int j)
      +
      Add grid element to the principal pane
      +
      +
      Parameters:
      +
      object - object to add to the pane
      +
      principalPane - pane where we'll add the object
      +
      i -
      +
      j -
      +
      +
      +
    • +
    • +
      +

      putStatePlayerPane

      +
      public void putStatePlayerPane(javafx.scene.layout.Pane principalPane)
      +
      Create the right pane
      +
      +
      Parameters:
      +
      principalPane - principal pane where we'll add the left down pane
      +
      +
      +
    • +
    • +
      +

      showStatePlayer

      +
      public javafx.scene.layout.StackPane showStatePlayer(String type, + int playerNumber)
      +
      Build left down pane (list all players information)
      +
      +
      Parameters:
      +
      type -
      +
      playerNumber -
      +
      Returns:
      +
      +
      +
    • +
    • +
      +

      putMoveTextPane

      +
      public void putMoveTextPane(javafx.scene.layout.Pane principalPane)
      +
      build left down pane and move it to its position
      +
      +
      Parameters:
      +
      principalPane - the principal pane where we'll add the left down pane
      +
      +
      +
    • +
    • +
      +

      showMoveText

      +
      public javafx.scene.layout.StackPane showMoveText()
      +
      Build the left down pane (contains current player information)
      +
      +
      Returns:
      +
      the built pane
      +
      +
      +
    • +
    • +
      +

      setSelectedReunionAction

      +
      public void setSelectedReunionAction(fr.lnl.game.server.games.action.ReunionSameAction selectedReunionAction)
      +
      +
    • +
    • +
      +

      getNextPlayerButtonListener

      +
      public NextPlayerButtonListener getNextPlayerButtonListener()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/livraison/doc/client/client/fr/lnl/game/client/view/package-summary.html b/livraison/doc/client/client/fr/lnl/game/client/view/package-summary.html new file mode 100644 index 0000000..c1f2fdb --- /dev/null +++ b/livraison/doc/client/client/fr/lnl/game/client/view/package-summary.html @@ -0,0 +1,131 @@ + + + + +fr.lnl.game.client.view (client API) + + + + + + + + + + + + + + +
+ +
+
+
+
Module client
+

Package fr.lnl.game.client.view

+
+
+
package fr.lnl.game.client.view
+
+
View package, contains all classes about user view
+
+
+
    +
  • + +
  • +
  • +
    +
    +
    +
    +
    Class
    +
    Description
    + +
    +
    Abstract class implemented by every view classes
    +
    + +
    +
    classe qui a pour but de générer chaque case de la grid et de vérifier les entités présentes dessus + (Mur, Joueur, Energie, Bombe, etc.)
    +
    + +
    +
    View terminal, use standard input and output
    +
    + +
    +
    View interface, implemented by Terminal and Window.
    +
    + +
    +
    View manager, main access to every views
    +
    + +
    +
    Window view, use mouse and keyboard to control interface
    +
    +
    +
    +
    +
  • +
+
+
+
+
+ + diff --git a/livraison/doc/client/client/fr/lnl/game/client/view/package-tree.html b/livraison/doc/client/client/fr/lnl/game/client/view/package-tree.html new file mode 100644 index 0000000..7e08065 --- /dev/null +++ b/livraison/doc/client/client/fr/lnl/game/client/view/package-tree.html @@ -0,0 +1,95 @@ + + + + +fr.lnl.game.client.view Class Hierarchy (client API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package fr.lnl.game.client.view

+Package Hierarchies: + +
+
+

Class Hierarchy

+
    +
  • java.lang.Object +
      +
    • fr.lnl.game.client.view.AbstractView (implements fr.lnl.game.client.view.View) + +
    • +
    • javafx.scene.Node (implements javafx.event.EventTarget, javafx.css.Styleable) +
        +
      • javafx.scene.shape.Shape +
          +
        • javafx.scene.shape.Rectangle +
            +
          • fr.lnl.game.client.view.Cell
          • +
          +
        • +
        +
      • +
      +
    • +
    • fr.lnl.game.client.view.ViewManager
    • +
    +
  • +
+
+
+

Interface Hierarchy

+
    +
  • fr.lnl.game.client.view.View
  • +
+
+
+
+
+ + diff --git a/livraison/doc/client/client/module-summary.html b/livraison/doc/client/client/module-summary.html new file mode 100644 index 0000000..e3c3fe5 --- /dev/null +++ b/livraison/doc/client/client/module-summary.html @@ -0,0 +1,148 @@ + + + + +client (client API) + + + + + + + + + + + + + + +
+ +
+
+
+

Module client

+
+
+
module client
+
+ +
Client module, include every view and controller classes from MVC model
+
+
+
    +
  • +
    + +

    Packages

    +
    +
    Exports
    +
    +
    Package
    +
    Description
    + +
    +
    Client package
    +
    + +
    +
    Package that contains every view listeners
    +
    + +
    +
    View package, contains all classes about user view
    +
    +
    +
    +
    Indirect Exports
    +
    +
    From
    +
    Packages
    +
    java.base
    +
    com.sun.crypto.provider com.sun.security.ntlm java.io java.lang java.lang.annotation java.lang.constant java.lang.invoke java.lang.module java.lang.ref java.lang.reflect java.lang.runtime java.math java.net java.net.spi java.nio java.nio.channels java.nio.channels.spi java.nio.charset java.nio.charset.spi java.nio.file java.nio.file.attribute java.nio.file.spi java.security java.security.cert java.security.interfaces java.security.spec java.text java.text.spi java.time java.time.chrono java.time.format java.time.temporal java.time.zone java.util java.util.concurrent java.util.concurrent.atomic java.util.concurrent.locks java.util.function java.util.jar java.util.random java.util.regex java.util.spi java.util.stream java.util.zip javax.crypto javax.crypto.interfaces javax.crypto.spec javax.net javax.net.ssl javax.security.auth javax.security.auth.callback javax.security.auth.login javax.security.auth.spi javax.security.auth.x500 javax.security.cert jdk.internal.access jdk.internal.access.foreign jdk.internal.event jdk.internal.invoke jdk.internal.javac jdk.internal.jimage jdk.internal.jimage.decompressor jdk.internal.jmod jdk.internal.loader jdk.internal.logger jdk.internal.misc jdk.internal.module jdk.internal.org.objectweb.asm jdk.internal.org.objectweb.asm.commons jdk.internal.org.objectweb.asm.tree jdk.internal.org.objectweb.asm.util jdk.internal.org.xml.sax jdk.internal.org.xml.sax.helpers jdk.internal.perf jdk.internal.platform jdk.internal.ref jdk.internal.reflect jdk.internal.util jdk.internal.util.jar jdk.internal.util.random jdk.internal.util.xml jdk.internal.util.xml.impl jdk.internal.vm jdk.internal.vm.annotation jdk.internal.vm.vector sun.invoke.util sun.net sun.net.dns sun.net.ext sun.net.util sun.net.www sun.net.www.protocol.http sun.nio.ch sun.nio.cs sun.nio.fs sun.reflect.annotation sun.reflect.generics.reflectiveObjects sun.reflect.misc sun.security.action sun.security.internal.interfaces sun.security.internal.spec sun.security.jca sun.security.pkcs sun.security.provider sun.security.provider.certpath sun.security.rsa sun.security.timestamp sun.security.tools sun.security.util sun.security.util.math sun.security.util.math.intpoly sun.security.validator sun.security.x509 sun.util.cldr sun.util.locale.provider sun.util.logging sun.util.resources
    +
    javafx.base
    +
    com.sun.javafx com.sun.javafx.beans com.sun.javafx.binding com.sun.javafx.collections com.sun.javafx.event com.sun.javafx.logging com.sun.javafx.property com.sun.javafx.reflect com.sun.javafx.runtime javafx.beans javafx.beans.binding javafx.beans.property javafx.beans.property.adapter javafx.beans.value javafx.collections javafx.collections.transformation javafx.event javafx.util javafx.util.converter
    +
    javafx.controls
    +
    com.sun.javafx.scene.control com.sun.javafx.scene.control.behavior com.sun.javafx.scene.control.inputmap com.sun.javafx.scene.control.skin javafx.scene.chart javafx.scene.control javafx.scene.control.cell javafx.scene.control.skin
    +
    javafx.graphics
    +
    com.sun.glass.ui com.sun.glass.utils com.sun.javafx.application com.sun.javafx.css com.sun.javafx.cursor com.sun.javafx.embed com.sun.javafx.font com.sun.javafx.geom com.sun.javafx.geom.transform com.sun.javafx.iio com.sun.javafx.menu com.sun.javafx.scene com.sun.javafx.scene.input com.sun.javafx.scene.layout com.sun.javafx.scene.text com.sun.javafx.scene.traversal com.sun.javafx.sg.prism com.sun.javafx.stage com.sun.javafx.text com.sun.javafx.tk com.sun.javafx.util com.sun.prism com.sun.prism.image com.sun.prism.paint com.sun.scenario.effect com.sun.scenario.effect.impl com.sun.scenario.effect.impl.prism javafx.animation javafx.application javafx.concurrent javafx.css javafx.css.converter javafx.geometry javafx.print javafx.scene javafx.scene.canvas javafx.scene.effect javafx.scene.image javafx.scene.input javafx.scene.layout javafx.scene.paint javafx.scene.robot javafx.scene.shape javafx.scene.text javafx.scene.transform javafx.stage
    +
    server
    +
    fr.lnl.game.server fr.lnl.game.server.games fr.lnl.game.server.games.action fr.lnl.game.server.games.grid fr.lnl.game.server.games.grid.build fr.lnl.game.server.games.grid.elements fr.lnl.game.server.games.player fr.lnl.game.server.games.weapon fr.lnl.game.server.listener fr.lnl.game.server.utils
    +
    +
    +
  • +
  • +
    + +

    Modules

    +
    Requires
    +
    +
    Modifier
    +
    Module
    +
    Description
    +
    +
    java.base
    +
     
    +
    +
    javafx.controls
    +
     
    +
    transitive
    +
    javafx.graphics
    +
     
    +
    +
    server
    +
     
    +
    +
    Indirect Requires
    +
    +
    Modifier
    +
    Module
    +
    Description
    +
    transitive
    +
    javafx.base
    +
     
    +
    +
    +
  • +
+
+
+
+
+ + diff --git a/livraison/doc/client/constant-values.html b/livraison/doc/client/constant-values.html new file mode 100644 index 0000000..514add7 --- /dev/null +++ b/livraison/doc/client/constant-values.html @@ -0,0 +1,84 @@ + + + + +Constant Field Values (client API) + + + + + + + + + + + + + + +
+ +
+
+
+

Constant Field Values

+
+

Contents

+ +
+
+
+

fr.lnl.*

+
    +
  • +
    fr.lnl.game.client.view.Window
    +
    +
    Modifier and Type
    +
    Constant Field
    +
    Value
    +
    public static final int
    + +
    40
    +
    public static final int
    + +
    160
    +
    public static final int
    + +
    500
    +
    +
  • +
+
+
+
+
+ + diff --git a/livraison/doc/client/element-list b/livraison/doc/client/element-list new file mode 100644 index 0000000..bc8579a --- /dev/null +++ b/livraison/doc/client/element-list @@ -0,0 +1,4 @@ +module:client +fr.lnl.game.client +fr.lnl.game.client.listener +fr.lnl.game.client.view diff --git a/livraison/doc/client/help-doc.html b/livraison/doc/client/help-doc.html new file mode 100644 index 0000000..08c6272 --- /dev/null +++ b/livraison/doc/client/help-doc.html @@ -0,0 +1,185 @@ + + + + +API Help (client API) + + + + + + + + + + + + + + +
+ +
+
+

JavaDoc Help

+ +
+
+

Navigation

+Starting from the Overview page, you can browse the documentation using the links in each page, and in the navigation bar at the top of each page. The Index and Search box allow you to navigate to specific declarations and summary pages, including: All Packages, All Classes and Interfaces + +
+
+
+

Kinds of Pages

+The following sections describe the different kinds of pages in this collection. +
+

Module

+

Each module has a page that contains a list of its packages, dependencies on other modules, and services, with a summary for each. These pages may contain the following categories:

+
    +
  • Packages
  • +
  • Modules
  • +
  • Services
  • +
+
+
+

Package

+

Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:

+
    +
  • Interfaces
  • +
  • Classes
  • +
  • Enum Classes
  • +
  • Exceptions
  • +
  • Errors
  • +
  • Annotation Interfaces
  • +
+
+
+

Class or Interface

+

Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.

+
    +
  • Class Inheritance Diagram
  • +
  • Direct Subclasses
  • +
  • All Known Subinterfaces
  • +
  • All Known Implementing Classes
  • +
  • Class or Interface Declaration
  • +
  • Class or Interface Description
  • +
+
+
    +
  • Nested Class Summary
  • +
  • Enum Constant Summary
  • +
  • Field Summary
  • +
  • Property Summary
  • +
  • Constructor Summary
  • +
  • Method Summary
  • +
  • Required Element Summary
  • +
  • Optional Element Summary
  • +
+
+
    +
  • Enum Constant Details
  • +
  • Field Details
  • +
  • Property Details
  • +
  • Constructor Details
  • +
  • Method Details
  • +
  • Element Details
  • +
+

Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.

+

The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

+
+
+

Other Files

+

Packages and modules may contain pages with additional information related to the declarations nearby.

+
+
+

Tree (Class Hierarchy)

+

There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.

+
    +
  • When viewing the Overview page, clicking on TREE displays the hierarchy for all packages.
  • +
  • When viewing a particular package, class or interface page, clicking on TREE displays the hierarchy for only that package.
  • +
+
+
+

Constant Field Values

+

The Constant Field Values page lists the static final fields and their values.

+
+
+

All Packages

+

The All Packages page contains an alphabetic index of all packages contained in the documentation.

+
+
+

All Classes and Interfaces

+

The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.

+
+
+

Index

+

The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.

+
+
+
+This help file applies to API documentation generated by the standard doclet.
+
+
+ + diff --git a/livraison/doc/client/index-all.html b/livraison/doc/client/index-all.html new file mode 100644 index 0000000..f0ad56d --- /dev/null +++ b/livraison/doc/client/index-all.html @@ -0,0 +1,482 @@ + + + + +Index (client API) + + + + + + + + + + + + + + +
+ +
+
+
+

Index

+
+A B C D E F G H L M N P R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values +

A

+
+
AbstractView - Class in fr.lnl.game.client.view
+
+
Abstract class implemented by every view classes
+
+
AbstractView(Game, Player) - Constructor for class fr.lnl.game.client.view.AbstractView
+
 
+
action - Variable in class fr.lnl.game.client.listener.SelectDirectionListener
+
 
+
addButtonToPane(String, EventHandler<ActionEvent>, Pane, int, int) - Method in class fr.lnl.game.client.view.Window
+
+
called when we add a button in the interface
+
+
addToPrincipalPanel(Object, Pane, int, int) - Method in class fr.lnl.game.client.view.Window
+
+
Add grid element to the principal pane
+
+
App - Class in fr.lnl.game.client
+
+
Application starting point
+
+
App() - Constructor for class fr.lnl.game.client.App
+
 
+
argsList - Static variable in class fr.lnl.game.client.App
+
 
+
+

B

+
+
BACKGROUND_IMAGE - Static variable in class fr.lnl.game.client.view.Cell
+
 
+
bg - Static variable in class fr.lnl.game.client.view.Window
+
 
+
BG - Static variable in class fr.lnl.game.client.view.Cell
+
 
+
BOMB_IMAGE - Static variable in class fr.lnl.game.client.view.Cell
+
 
+
buttonPane - Variable in class fr.lnl.game.client.view.Window
+
 
+
+

C

+
+
Cell - Class in fr.lnl.game.client.view
+
+
classe qui a pour but de générer chaque case de la grid et de vérifier les entités présentes dessus + (Mur, Joueur, Energie, Bombe, etc.)
+
+
Cell(int, int) - Constructor for class fr.lnl.game.client.view.Cell
+
 
+
cellSize - Static variable in class fr.lnl.game.client.view.Window
+
 
+
choseAction() - Method in class fr.lnl.game.client.view.Terminal
+
+
Used when current player is an instance of HumanPlayer and demand to it + an action to do
+
+
choseDirectionAction(ReunionSameAction) - Method in class fr.lnl.game.client.view.Window
+
+
Choose a direction between all possible from the previously selected action type
+
+
choseReunionSameAction(List<ReunionSameAction>) - Method in class fr.lnl.game.client.view.Terminal
+
+
Used when current player is an instance of HumanPlayer and demand to it + a type of action to do
+
+
choseReunionSameAction(List<ReunionSameAction>) - Method in class fr.lnl.game.client.view.Window
+
+
Used when Game.getCurrentPlayer() is an instance of HumanPlayer.
+
+
client - module client
+
+
Client module, include every view and controller classes from MVC model
+
+
ClientEventHandler - Record Class in fr.lnl.game.client.listener
+
+
implementation of a listener from JavaFX EventHandler
+
+
ClientEventHandler(ModelListener) - Constructor for record class fr.lnl.game.client.listener.ClientEventHandler
+
+
Creates an instance of a ClientEventHandler record class.
+
+
ClientPlayer - Record Class in fr.lnl.game.client
+
+
Store a view per player
+
+
ClientPlayer(Player, View) - Constructor for record class fr.lnl.game.client.ClientPlayer
+
+
Creates an instance of a ClientPlayer record class.
+
+
createContent() - Method in class fr.lnl.game.client.view.Window
+
+
Create content of the stage
+
+
createNewPlayer(Class<? extends AbstractPlayer>, ClassPlayer, int) - Static method in class fr.lnl.game.client.App
+
+
create a new instance of the player
+
+
createViewLambda(Player) - Method in interface fr.lnl.game.client.ViewLambda
+
+
A lambda create an anonymous class which implements this interface
+
+
+

D

+
+
dark - Static variable in class fr.lnl.game.client.view.Window
+
 
+
displayWinner(Player) - Method in class fr.lnl.game.client.view.Terminal
+
+
Used to display the winner of the game
+
+
displayWinner(Player) - Method in interface fr.lnl.game.client.view.View
+
+
Used to display the name of the winner
+
+
displayWinner(Player) - Method in class fr.lnl.game.client.view.ViewManager
+
+
This method is call when the game is finish
+
+
displayWinner(Player) - Method in class fr.lnl.game.client.view.Window
+
+
Used to display the name of the winner
+
+
displayWinnerEvent - Variable in class fr.lnl.game.client.listener.NextPlayerButtonListener
+
 
+
DisplayWinnerEvent - Class in fr.lnl.game.client.listener
+
+
Used to display the winner of the game
+
+
DisplayWinnerEvent() - Constructor for class fr.lnl.game.client.listener.DisplayWinnerEvent
+
 
+
+

E

+
+
ENERGY_BALL_IMAGE - Static variable in class fr.lnl.game.client.view.Cell
+
 
+
equals(Object) - Method in record class fr.lnl.game.client.ClientPlayer
+
+
Indicates whether some other object is "equal to" this one.
+
+
equals(Object) - Method in record class fr.lnl.game.client.listener.ClientEventHandler
+
+
Indicates whether some other object is "equal to" this one.
+
+
+

F

+
+
fr.lnl.game.client - package fr.lnl.game.client
+
+
Client package
+
+
fr.lnl.game.client.listener - package fr.lnl.game.client.listener
+
+
Package that contains every view listeners
+
+
fr.lnl.game.client.view - package fr.lnl.game.client.view
+
+
View package, contains all classes about user view
+
+
+

G

+
+
game - Static variable in class fr.lnl.game.client.App
+
 
+
game - Variable in class fr.lnl.game.client.listener.NextPlayerButtonListener
+
 
+
game - Variable in class fr.lnl.game.client.listener.SelectActionButton
+
 
+
game - Variable in class fr.lnl.game.client.listener.SelectDirectionListener
+
 
+
game - Variable in class fr.lnl.game.client.view.AbstractView
+
 
+
game - Variable in class fr.lnl.game.client.view.ViewManager
+
 
+
getGame() - Static method in class fr.lnl.game.client.App
+
 
+
getNextPlayerButtonListener() - Method in class fr.lnl.game.client.view.Window
+
 
+
getPlayerImage() - Static method in class fr.lnl.game.client.view.Cell
+
 
+
getServerPlayer() - Method in record class fr.lnl.game.client.ClientPlayer
+
 
+
getView() - Method in record class fr.lnl.game.client.ClientPlayer
+
 
+
getViewManager() - Static method in class fr.lnl.game.client.App
+
 
+
+

H

+
+
handle(ActionEvent) - Method in record class fr.lnl.game.client.listener.ClientEventHandler
+
+
This method is call by JavaFX when we click to the button
+
+
hashCode() - Method in record class fr.lnl.game.client.ClientPlayer
+
+
Returns a hash code value for this object.
+
+
hashCode() - Method in record class fr.lnl.game.client.listener.ClientEventHandler
+
+
Returns a hash code value for this object.
+
+
height - Static variable in class fr.lnl.game.client.view.Window
+
 
+
+

L

+
+
launchTerminal() - Static method in class fr.lnl.game.client.App
+
 
+
listener - Variable in record class fr.lnl.game.client.listener.ClientEventHandler
+
+
The field for the listener record component.
+
+
listener() - Method in record class fr.lnl.game.client.listener.ClientEventHandler
+
+
Returns the value of the listener record component.
+
+
+

M

+
+
main(String[]) - Static method in class fr.lnl.game.client.App
+
 
+
MINE_IMAGE - Static variable in class fr.lnl.game.client.view.Cell
+
 
+
+

N

+
+
nextPlayerButtonListener - Variable in class fr.lnl.game.client.view.Window
+
 
+
NextPlayerButtonListener - Class in fr.lnl.game.client.listener
+
+
This method is call when the current player have selected an action to play (or if it's a computer player, will + select it), then we call Game.play() and we update the view
+
+
NextPlayerButtonListener(Game) - Constructor for class fr.lnl.game.client.listener.NextPlayerButtonListener
+
 
+
+

P

+
+
parsePlayers() - Static method in class fr.lnl.game.client.App
+
+
Parse players arguments and create instances for each player
+
+
parseView() - Static method in class fr.lnl.game.client.App
+
+
Parse the first argument given by user to know the view to use (Terminal or Window)
+
+
player - Variable in class fr.lnl.game.client.view.AbstractView
+
 
+
PLAYER_IMAGE - Static variable in class fr.lnl.game.client.view.Cell
+
 
+
PLAYER_SHIELD_IMAGE - Static variable in class fr.lnl.game.client.view.Cell
+
 
+
PLAYER_SHOT_IMAGE - Static variable in class fr.lnl.game.client.view.Cell
+
 
+
players - Variable in class fr.lnl.game.client.view.ViewManager
+
 
+
putMoveTextPane(Pane) - Method in class fr.lnl.game.client.view.Window
+
+
build left down pane and move it to its position
+
+
putStatePlayerPane(Pane) - Method in class fr.lnl.game.client.view.Window
+
+
Create the right pane
+
+
+

R

+
+
reunionSameAction - Variable in class fr.lnl.game.client.listener.SelectActionButton
+
 
+
run() - Method in class fr.lnl.game.client.view.ViewManager
+
+
This method is call after initialized view manager to display a first screen
+
+
+

S

+
+
scanner - Static variable in class fr.lnl.game.client.view.Terminal
+
+
Standard input
+
+
SelectActionButton - Class in fr.lnl.game.client.listener
+
+
Used when the human player select type of action it want to play
+
+
SelectActionButton(Game, Window, ReunionSameAction) - Constructor for class fr.lnl.game.client.listener.SelectActionButton
+
 
+
SelectDirectionListener - Class in fr.lnl.game.client.listener
+
+
Call when the player selected the direction where it wants to play it
+
+
SelectDirectionListener(Game, Window, Action) - Constructor for class fr.lnl.game.client.listener.SelectDirectionListener
+
 
+
selectedReunionAction - Variable in class fr.lnl.game.client.view.Window
+
 
+
serverPlayer - Variable in record class fr.lnl.game.client.ClientPlayer
+
+
The field for the serverPlayer record component.
+
+
serverPlayer() - Method in record class fr.lnl.game.client.ClientPlayer
+
+
Returns the value of the serverPlayer record component.
+
+
setImageObject(Object, Game) - Static method in class fr.lnl.game.client.view.Cell
+
 
+
setSelectedReunionAction(ReunionSameAction) - Method in class fr.lnl.game.client.view.Window
+
 
+
show() - Method in class fr.lnl.game.client.view.Terminal
+
+
Used to update view
+
+
show() - Method in interface fr.lnl.game.client.view.View
+
+
used to update screen
+
+
show() - Method in class fr.lnl.game.client.view.Window
+
+
used to update screen
+
+
showMoveText() - Method in class fr.lnl.game.client.view.Window
+
+
Build the left down pane (contains current player information)
+
+
showStatePlayer(String, int) - Method in class fr.lnl.game.client.view.Window
+
+
Build left down pane (list all players information)
+
+
stage - Variable in class fr.lnl.game.client.view.Window
+
 
+
start(Stage) - Method in class fr.lnl.game.client.App
+
 
+
startGame() - Static method in class fr.lnl.game.client.App
+
+
Parse players arguments and create a new instance of Game
+
+
+

T

+
+
Terminal - Class in fr.lnl.game.client.view
+
+
View terminal, use standard input and output
+
+
Terminal(Game, Player) - Constructor for class fr.lnl.game.client.view.Terminal
+
 
+
terminalView() - Method in class fr.lnl.game.client.view.ViewManager
+
+
This method is call when the view is a terminal
+
+
toString() - Method in record class fr.lnl.game.client.ClientPlayer
+
+
Returns a string representation of this record class.
+
+
toString() - Method in record class fr.lnl.game.client.listener.ClientEventHandler
+
+
Returns a string representation of this record class.
+
+
+

U

+
+
updateModel(Object) - Method in class fr.lnl.game.client.listener.DisplayWinnerEvent
+
+
This method is call when the game is over
+
+
updateModel(Object) - Method in class fr.lnl.game.client.listener.NextPlayerButtonListener
+
+
Call when clicking on "SUIVANT" button if current player is a computer player or after the human player selected + action it want to play
+
+
updateModel(Object) - Method in class fr.lnl.game.client.listener.SelectActionButton
+
+
This method is call when the player select the type of action it want to play
+
+
updateModel(Object) - Method in class fr.lnl.game.client.listener.SelectDirectionListener
+
+
This method is call when the player click on the button to select the direction of the previously selected action
+
+
updateView() - Method in class fr.lnl.game.client.view.ViewManager
+
+
Call when we need to change or update view
+
+
+

V

+
+
view - Variable in record class fr.lnl.game.client.ClientPlayer
+
+
The field for the view record component.
+
+
view() - Method in record class fr.lnl.game.client.ClientPlayer
+
+
Returns the value of the view record component.
+
+
View - Interface in fr.lnl.game.client.view
+
+
View interface, implemented by Terminal and Window.
+
+
ViewLambda - Interface in fr.lnl.game.client
+
+
Used as Lambda expression to instantiate a View per Player stored in ClientPlayer
+
+
viewManager - Static variable in class fr.lnl.game.client.App
+
 
+
ViewManager - Class in fr.lnl.game.client.view
+
+
View manager, main access to every views
+
+
ViewManager(Game, Class<? extends View>, ViewLambda) - Constructor for class fr.lnl.game.client.view.ViewManager
+
 
+
viewType - Variable in class fr.lnl.game.client.view.ViewManager
+
 
+
+

W

+
+
WALL_IMAGE - Static variable in class fr.lnl.game.client.view.Cell
+
 
+
width - Static variable in class fr.lnl.game.client.view.Window
+
 
+
window - Variable in class fr.lnl.game.client.listener.SelectActionButton
+
 
+
window - Variable in class fr.lnl.game.client.listener.SelectDirectionListener
+
 
+
Window - Class in fr.lnl.game.client.view
+
+
Window view, use mouse and keyboard to control interface
+
+
Window(Stage, Game, Player) - Constructor for class fr.lnl.game.client.view.Window
+
 
+
+A B C D E F G H L M N P R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values
+
+
+ + diff --git a/livraison/doc/client/index.html b/livraison/doc/client/index.html new file mode 100644 index 0000000..93086f6 --- /dev/null +++ b/livraison/doc/client/index.html @@ -0,0 +1,25 @@ + + + + +client API + + + + + + + + + + +
+ +

client/module-summary.html

+
+ + diff --git a/livraison/doc/client/jquery-ui.overrides.css b/livraison/doc/client/jquery-ui.overrides.css new file mode 100644 index 0000000..1abff95 --- /dev/null +++ b/livraison/doc/client/jquery-ui.overrides.css @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ + +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active, +a.ui-button:active, +.ui-button:active, +.ui-button.ui-state-active:hover { + /* Overrides the color of selection used in jQuery UI */ + background: #F8981D; +} diff --git a/livraison/doc/client/legal/COPYRIGHT b/livraison/doc/client/legal/COPYRIGHT new file mode 100644 index 0000000..ca74fff --- /dev/null +++ b/livraison/doc/client/legal/COPYRIGHT @@ -0,0 +1 @@ +Please see ..\java.base\COPYRIGHT diff --git a/livraison/doc/client/legal/LICENSE b/livraison/doc/client/legal/LICENSE new file mode 100644 index 0000000..4ad9fe4 --- /dev/null +++ b/livraison/doc/client/legal/LICENSE @@ -0,0 +1 @@ +Please see ..\java.base\LICENSE diff --git a/livraison/doc/client/legal/jquery.md b/livraison/doc/client/legal/jquery.md new file mode 100644 index 0000000..8054a34 --- /dev/null +++ b/livraison/doc/client/legal/jquery.md @@ -0,0 +1,72 @@ +## jQuery v3.5.1 + +### jQuery License +``` +jQuery v 3.5.1 +Copyright JS Foundation and other contributors, https://js.foundation/ + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +****************************************** + +The jQuery JavaScript Library v3.5.1 also includes Sizzle.js + +Sizzle.js includes the following license: + +Copyright JS Foundation and other contributors, https://js.foundation/ + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/jquery/sizzle + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +All files located in the node_modules and external directories are +externally maintained libraries used by this software which have their +own licenses; we recommend you read them, as their terms may differ from +the terms above. + +********************* + +``` diff --git a/livraison/doc/client/legal/jqueryUI.md b/livraison/doc/client/legal/jqueryUI.md new file mode 100644 index 0000000..8031bdb --- /dev/null +++ b/livraison/doc/client/legal/jqueryUI.md @@ -0,0 +1,49 @@ +## jQuery UI v1.12.1 + +### jQuery UI License +``` +Copyright jQuery Foundation and other contributors, https://jquery.org/ + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/jquery/jquery-ui + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code contained within the demos directory. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +All files located in the node_modules and external directories are +externally maintained libraries used by this software which have their +own licenses; we recommend you read them, as their terms may differ from +the terms above. + +``` diff --git a/livraison/doc/client/member-search-index.js b/livraison/doc/client/member-search-index.js new file mode 100644 index 0000000..bf26429 --- /dev/null +++ b/livraison/doc/client/member-search-index.js @@ -0,0 +1 @@ +memberSearchIndex = [{"p":"fr.lnl.game.client.view","c":"AbstractView","l":"AbstractView(Game, Player)","u":"%3Cinit%3E(fr.lnl.game.server.games.Game,fr.lnl.game.server.games.player.Player)"},{"p":"fr.lnl.game.client.listener","c":"SelectDirectionListener","l":"action"},{"p":"fr.lnl.game.client.view","c":"Window","l":"addButtonToPane(String, EventHandler, Pane, int, int)","u":"addButtonToPane(java.lang.String,javafx.event.EventHandler,javafx.scene.layout.Pane,int,int)"},{"p":"fr.lnl.game.client.view","c":"Window","l":"addToPrincipalPanel(Object, Pane, int, int)","u":"addToPrincipalPanel(java.lang.Object,javafx.scene.layout.Pane,int,int)"},{"p":"fr.lnl.game.client","c":"App","l":"App()","u":"%3Cinit%3E()"},{"p":"fr.lnl.game.client","c":"App","l":"argsList"},{"p":"fr.lnl.game.client.view","c":"Cell","l":"BACKGROUND_IMAGE"},{"p":"fr.lnl.game.client.view","c":"Window","l":"bg"},{"p":"fr.lnl.game.client.view","c":"Cell","l":"BG"},{"p":"fr.lnl.game.client.view","c":"Cell","l":"BOMB_IMAGE"},{"p":"fr.lnl.game.client.view","c":"Window","l":"buttonPane"},{"p":"fr.lnl.game.client.view","c":"Cell","l":"Cell(int, int)","u":"%3Cinit%3E(int,int)"},{"p":"fr.lnl.game.client.view","c":"Window","l":"cellSize"},{"p":"fr.lnl.game.client.view","c":"Terminal","l":"choseAction()"},{"p":"fr.lnl.game.client.view","c":"Window","l":"choseDirectionAction(ReunionSameAction)","u":"choseDirectionAction(fr.lnl.game.server.games.action.ReunionSameAction)"},{"p":"fr.lnl.game.client.view","c":"Terminal","l":"choseReunionSameAction(List)","u":"choseReunionSameAction(java.util.List)"},{"p":"fr.lnl.game.client.view","c":"Window","l":"choseReunionSameAction(List)","u":"choseReunionSameAction(java.util.List)"},{"p":"fr.lnl.game.client.listener","c":"ClientEventHandler","l":"ClientEventHandler(ModelListener)","u":"%3Cinit%3E(fr.lnl.game.server.listener.ModelListener)"},{"p":"fr.lnl.game.client","c":"ClientPlayer","l":"ClientPlayer(Player, View)","u":"%3Cinit%3E(fr.lnl.game.server.games.player.Player,fr.lnl.game.client.view.View)"},{"p":"fr.lnl.game.client.view","c":"Window","l":"createContent()"},{"p":"fr.lnl.game.client","c":"App","l":"createNewPlayer(Class, ClassPlayer, int)","u":"createNewPlayer(java.lang.Class,fr.lnl.game.server.games.player.ClassPlayer,int)"},{"p":"fr.lnl.game.client","c":"ViewLambda","l":"createViewLambda(Player)","u":"createViewLambda(fr.lnl.game.server.games.player.Player)"},{"p":"fr.lnl.game.client.view","c":"Window","l":"dark"},{"p":"fr.lnl.game.client.view","c":"Terminal","l":"displayWinner(Player)","u":"displayWinner(fr.lnl.game.server.games.player.Player)"},{"p":"fr.lnl.game.client.view","c":"View","l":"displayWinner(Player)","u":"displayWinner(fr.lnl.game.server.games.player.Player)"},{"p":"fr.lnl.game.client.view","c":"ViewManager","l":"displayWinner(Player)","u":"displayWinner(fr.lnl.game.server.games.player.Player)"},{"p":"fr.lnl.game.client.view","c":"Window","l":"displayWinner(Player)","u":"displayWinner(fr.lnl.game.server.games.player.Player)"},{"p":"fr.lnl.game.client.listener","c":"NextPlayerButtonListener","l":"displayWinnerEvent"},{"p":"fr.lnl.game.client.listener","c":"DisplayWinnerEvent","l":"DisplayWinnerEvent()","u":"%3Cinit%3E()"},{"p":"fr.lnl.game.client.view","c":"Cell","l":"ENERGY_BALL_IMAGE"},{"p":"fr.lnl.game.client","c":"ClientPlayer","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"fr.lnl.game.client.listener","c":"ClientEventHandler","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"fr.lnl.game.client","c":"App","l":"game"},{"p":"fr.lnl.game.client.listener","c":"NextPlayerButtonListener","l":"game"},{"p":"fr.lnl.game.client.listener","c":"SelectActionButton","l":"game"},{"p":"fr.lnl.game.client.listener","c":"SelectDirectionListener","l":"game"},{"p":"fr.lnl.game.client.view","c":"AbstractView","l":"game"},{"p":"fr.lnl.game.client.view","c":"ViewManager","l":"game"},{"p":"fr.lnl.game.client","c":"App","l":"getGame()"},{"p":"fr.lnl.game.client.view","c":"Window","l":"getNextPlayerButtonListener()"},{"p":"fr.lnl.game.client.view","c":"Cell","l":"getPlayerImage()"},{"p":"fr.lnl.game.client","c":"ClientPlayer","l":"getServerPlayer()"},{"p":"fr.lnl.game.client","c":"ClientPlayer","l":"getView()"},{"p":"fr.lnl.game.client","c":"App","l":"getViewManager()"},{"p":"fr.lnl.game.client.listener","c":"ClientEventHandler","l":"handle(ActionEvent)","u":"handle(javafx.event.ActionEvent)"},{"p":"fr.lnl.game.client","c":"ClientPlayer","l":"hashCode()"},{"p":"fr.lnl.game.client.listener","c":"ClientEventHandler","l":"hashCode()"},{"p":"fr.lnl.game.client.view","c":"Window","l":"height"},{"p":"fr.lnl.game.client","c":"App","l":"launchTerminal()"},{"p":"fr.lnl.game.client.listener","c":"ClientEventHandler","l":"listener"},{"p":"fr.lnl.game.client.listener","c":"ClientEventHandler","l":"listener()"},{"p":"fr.lnl.game.client","c":"App","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"fr.lnl.game.client.view","c":"Cell","l":"MINE_IMAGE"},{"p":"fr.lnl.game.client.view","c":"Window","l":"nextPlayerButtonListener"},{"p":"fr.lnl.game.client.listener","c":"NextPlayerButtonListener","l":"NextPlayerButtonListener(Game)","u":"%3Cinit%3E(fr.lnl.game.server.games.Game)"},{"p":"fr.lnl.game.client","c":"App","l":"parsePlayers()"},{"p":"fr.lnl.game.client","c":"App","l":"parseView()"},{"p":"fr.lnl.game.client.view","c":"AbstractView","l":"player"},{"p":"fr.lnl.game.client.view","c":"Cell","l":"PLAYER_IMAGE"},{"p":"fr.lnl.game.client.view","c":"Cell","l":"PLAYER_SHIELD_IMAGE"},{"p":"fr.lnl.game.client.view","c":"Cell","l":"PLAYER_SHOT_IMAGE"},{"p":"fr.lnl.game.client.view","c":"ViewManager","l":"players"},{"p":"fr.lnl.game.client.view","c":"Window","l":"putMoveTextPane(Pane)","u":"putMoveTextPane(javafx.scene.layout.Pane)"},{"p":"fr.lnl.game.client.view","c":"Window","l":"putStatePlayerPane(Pane)","u":"putStatePlayerPane(javafx.scene.layout.Pane)"},{"p":"fr.lnl.game.client.listener","c":"SelectActionButton","l":"reunionSameAction"},{"p":"fr.lnl.game.client.view","c":"ViewManager","l":"run()"},{"p":"fr.lnl.game.client.view","c":"Terminal","l":"scanner"},{"p":"fr.lnl.game.client.listener","c":"SelectActionButton","l":"SelectActionButton(Game, Window, ReunionSameAction)","u":"%3Cinit%3E(fr.lnl.game.server.games.Game,fr.lnl.game.client.view.Window,fr.lnl.game.server.games.action.ReunionSameAction)"},{"p":"fr.lnl.game.client.listener","c":"SelectDirectionListener","l":"SelectDirectionListener(Game, Window, Action)","u":"%3Cinit%3E(fr.lnl.game.server.games.Game,fr.lnl.game.client.view.Window,fr.lnl.game.server.games.action.Action)"},{"p":"fr.lnl.game.client.view","c":"Window","l":"selectedReunionAction"},{"p":"fr.lnl.game.client","c":"ClientPlayer","l":"serverPlayer"},{"p":"fr.lnl.game.client","c":"ClientPlayer","l":"serverPlayer()"},{"p":"fr.lnl.game.client.view","c":"Cell","l":"setImageObject(Object, Game)","u":"setImageObject(java.lang.Object,fr.lnl.game.server.games.Game)"},{"p":"fr.lnl.game.client.view","c":"Window","l":"setSelectedReunionAction(ReunionSameAction)","u":"setSelectedReunionAction(fr.lnl.game.server.games.action.ReunionSameAction)"},{"p":"fr.lnl.game.client.view","c":"Terminal","l":"show()"},{"p":"fr.lnl.game.client.view","c":"View","l":"show()"},{"p":"fr.lnl.game.client.view","c":"Window","l":"show()"},{"p":"fr.lnl.game.client.view","c":"Window","l":"showMoveText()"},{"p":"fr.lnl.game.client.view","c":"Window","l":"showStatePlayer(String, int)","u":"showStatePlayer(java.lang.String,int)"},{"p":"fr.lnl.game.client.view","c":"Window","l":"stage"},{"p":"fr.lnl.game.client","c":"App","l":"start(Stage)","u":"start(javafx.stage.Stage)"},{"p":"fr.lnl.game.client","c":"App","l":"startGame()"},{"p":"fr.lnl.game.client.view","c":"Terminal","l":"Terminal(Game, Player)","u":"%3Cinit%3E(fr.lnl.game.server.games.Game,fr.lnl.game.server.games.player.Player)"},{"p":"fr.lnl.game.client.view","c":"ViewManager","l":"terminalView()"},{"p":"fr.lnl.game.client","c":"ClientPlayer","l":"toString()"},{"p":"fr.lnl.game.client.listener","c":"ClientEventHandler","l":"toString()"},{"p":"fr.lnl.game.client.listener","c":"DisplayWinnerEvent","l":"updateModel(Object)","u":"updateModel(java.lang.Object)"},{"p":"fr.lnl.game.client.listener","c":"NextPlayerButtonListener","l":"updateModel(Object)","u":"updateModel(java.lang.Object)"},{"p":"fr.lnl.game.client.listener","c":"SelectActionButton","l":"updateModel(Object)","u":"updateModel(java.lang.Object)"},{"p":"fr.lnl.game.client.listener","c":"SelectDirectionListener","l":"updateModel(Object)","u":"updateModel(java.lang.Object)"},{"p":"fr.lnl.game.client.view","c":"ViewManager","l":"updateView()"},{"p":"fr.lnl.game.client","c":"ClientPlayer","l":"view"},{"p":"fr.lnl.game.client","c":"ClientPlayer","l":"view()"},{"p":"fr.lnl.game.client","c":"App","l":"viewManager"},{"p":"fr.lnl.game.client.view","c":"ViewManager","l":"ViewManager(Game, Class, ViewLambda)","u":"%3Cinit%3E(fr.lnl.game.server.games.Game,java.lang.Class,fr.lnl.game.client.ViewLambda)"},{"p":"fr.lnl.game.client.view","c":"ViewManager","l":"viewType"},{"p":"fr.lnl.game.client.view","c":"Cell","l":"WALL_IMAGE"},{"p":"fr.lnl.game.client.view","c":"Window","l":"width"},{"p":"fr.lnl.game.client.listener","c":"SelectActionButton","l":"window"},{"p":"fr.lnl.game.client.listener","c":"SelectDirectionListener","l":"window"},{"p":"fr.lnl.game.client.view","c":"Window","l":"Window(Stage, Game, Player)","u":"%3Cinit%3E(javafx.stage.Stage,fr.lnl.game.server.games.Game,fr.lnl.game.server.games.player.Player)"}];updateSearchResults(); \ No newline at end of file diff --git a/livraison/doc/client/module-search-index.js b/livraison/doc/client/module-search-index.js new file mode 100644 index 0000000..52bc8f6 --- /dev/null +++ b/livraison/doc/client/module-search-index.js @@ -0,0 +1 @@ +moduleSearchIndex = [{"l":"client"}];updateSearchResults(); \ No newline at end of file diff --git a/livraison/doc/client/overview-tree.html b/livraison/doc/client/overview-tree.html new file mode 100644 index 0000000..88c4290 --- /dev/null +++ b/livraison/doc/client/overview-tree.html @@ -0,0 +1,117 @@ + + + + +Class Hierarchy (client API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For All Packages

+Package Hierarchies: + +
+
+

Class Hierarchy

+
    +
  • java.lang.Object +
      +
    • fr.lnl.game.server.listener.AbstractModelListening (implements fr.lnl.game.server.listener.ModelListener) + +
    • +
    • fr.lnl.game.client.view.AbstractView (implements fr.lnl.game.client.view.View) + +
    • +
    • javafx.application.Application +
        +
      • fr.lnl.game.client.App
      • +
      +
    • +
    • javafx.scene.Node (implements javafx.event.EventTarget, javafx.css.Styleable) +
        +
      • javafx.scene.shape.Shape +
          +
        • javafx.scene.shape.Rectangle +
            +
          • fr.lnl.game.client.view.Cell
          • +
          +
        • +
        +
      • +
      +
    • +
    • java.lang.Record + +
    • +
    • fr.lnl.game.client.view.ViewManager
    • +
    +
  • +
+
+
+

Interface Hierarchy

+ +
+
+
+
+ + diff --git a/livraison/doc/client/package-search-index.js b/livraison/doc/client/package-search-index.js new file mode 100644 index 0000000..6652df9 --- /dev/null +++ b/livraison/doc/client/package-search-index.js @@ -0,0 +1 @@ +packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"m":"client","l":"fr.lnl.game.client"},{"m":"client","l":"fr.lnl.game.client.listener"},{"m":"client","l":"fr.lnl.game.client.view"}];updateSearchResults(); \ No newline at end of file diff --git a/livraison/doc/client/resources/glass.png b/livraison/doc/client/resources/glass.png new file mode 100644 index 0000000..a7f591f Binary files /dev/null and b/livraison/doc/client/resources/glass.png differ diff --git a/livraison/doc/client/resources/x.png b/livraison/doc/client/resources/x.png new file mode 100644 index 0000000..30548a7 Binary files /dev/null and b/livraison/doc/client/resources/x.png differ diff --git a/livraison/doc/client/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png b/livraison/doc/client/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png new file mode 100644 index 0000000..34abd18 Binary files /dev/null and b/livraison/doc/client/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png differ diff --git a/livraison/doc/client/script-dir/images/ui-bg_glass_65_dadada_1x400.png b/livraison/doc/client/script-dir/images/ui-bg_glass_65_dadada_1x400.png new file mode 100644 index 0000000..f058a93 Binary files /dev/null and b/livraison/doc/client/script-dir/images/ui-bg_glass_65_dadada_1x400.png differ diff --git a/livraison/doc/client/script-dir/images/ui-bg_glass_75_dadada_1x400.png b/livraison/doc/client/script-dir/images/ui-bg_glass_75_dadada_1x400.png new file mode 100644 index 0000000..2ce04c1 Binary files /dev/null and b/livraison/doc/client/script-dir/images/ui-bg_glass_75_dadada_1x400.png differ diff --git a/livraison/doc/client/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png b/livraison/doc/client/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png new file mode 100644 index 0000000..a90afb8 Binary files /dev/null and b/livraison/doc/client/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png differ diff --git a/livraison/doc/client/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png b/livraison/doc/client/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png new file mode 100644 index 0000000..dbe091f Binary files /dev/null and b/livraison/doc/client/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png differ diff --git a/livraison/doc/client/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/livraison/doc/client/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png new file mode 100644 index 0000000..5dc3593 Binary files /dev/null and b/livraison/doc/client/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ diff --git a/livraison/doc/client/script-dir/images/ui-icons_222222_256x240.png b/livraison/doc/client/script-dir/images/ui-icons_222222_256x240.png new file mode 100644 index 0000000..e723e17 Binary files /dev/null and b/livraison/doc/client/script-dir/images/ui-icons_222222_256x240.png differ diff --git a/livraison/doc/client/script-dir/images/ui-icons_2e83ff_256x240.png b/livraison/doc/client/script-dir/images/ui-icons_2e83ff_256x240.png new file mode 100644 index 0000000..1f5f497 Binary files /dev/null and b/livraison/doc/client/script-dir/images/ui-icons_2e83ff_256x240.png differ diff --git a/livraison/doc/client/script-dir/images/ui-icons_454545_256x240.png b/livraison/doc/client/script-dir/images/ui-icons_454545_256x240.png new file mode 100644 index 0000000..618f5b0 Binary files /dev/null and b/livraison/doc/client/script-dir/images/ui-icons_454545_256x240.png differ diff --git a/livraison/doc/client/script-dir/images/ui-icons_888888_256x240.png b/livraison/doc/client/script-dir/images/ui-icons_888888_256x240.png new file mode 100644 index 0000000..ee5e33f Binary files /dev/null and b/livraison/doc/client/script-dir/images/ui-icons_888888_256x240.png differ diff --git a/livraison/doc/client/script-dir/images/ui-icons_cd0a0a_256x240.png b/livraison/doc/client/script-dir/images/ui-icons_cd0a0a_256x240.png new file mode 100644 index 0000000..7e8ebc1 Binary files /dev/null and b/livraison/doc/client/script-dir/images/ui-icons_cd0a0a_256x240.png differ diff --git a/livraison/doc/client/script-dir/jquery-3.5.1.min.js b/livraison/doc/client/script-dir/jquery-3.5.1.min.js new file mode 100644 index 0000000..b061403 --- /dev/null +++ b/livraison/doc/client/script-dir/jquery-3.5.1.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0a;a++)for(s in o[a])n=o[a][s],o[a].hasOwnProperty(s)&&void 0!==n&&(e[s]=t.isPlainObject(n)?t.isPlainObject(e[s])?t.widget.extend({},e[s],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,s){var n=s.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=i.call(arguments,1),l=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(l=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(l=i&&i.jquery?l.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):l=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new s(o,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{classes:{},disabled:!1,create:null},_createWidget:function(i,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),i),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var l=s.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,c=l[2];c?n.on(h,c,r):i.on(h,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,l=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("
"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};h>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),l.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-a-n;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+a-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-a-n;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+a-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-r-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,(i>0||u>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.menu",{version:"1.12.1",defaultElement:"
    ",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,l=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=l.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("").data("ui-menu-submenu-caret",!0);a._addClass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=l.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasScroll:function(){return this.element.outerHeight()",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,void 0;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),void 0):(this._searchTimeout(t),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("
      ").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("
      ").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("
      ",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length").append(t("
      ").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("
      ").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete}); \ No newline at end of file diff --git a/livraison/doc/client/script-dir/jquery-ui.structure.min.css b/livraison/doc/client/script-dir/jquery-ui.structure.min.css new file mode 100644 index 0000000..e880892 --- /dev/null +++ b/livraison/doc/client/script-dir/jquery-ui.structure.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.12.1 - 2018-12-06 +* http://jqueryui.com +* Copyright jQuery Foundation and other contributors; Licensed MIT */ + +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0} \ No newline at end of file diff --git a/livraison/doc/client/script.js b/livraison/doc/client/script.js new file mode 100644 index 0000000..0765364 --- /dev/null +++ b/livraison/doc/client/script.js @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ + +var moduleSearchIndex; +var packageSearchIndex; +var typeSearchIndex; +var memberSearchIndex; +var tagSearchIndex; +function loadScripts(doc, tag) { + createElem(doc, tag, 'search.js'); + + createElem(doc, tag, 'module-search-index.js'); + createElem(doc, tag, 'package-search-index.js'); + createElem(doc, tag, 'type-search-index.js'); + createElem(doc, tag, 'member-search-index.js'); + createElem(doc, tag, 'tag-search-index.js'); +} + +function createElem(doc, tag, path) { + var script = doc.createElement(tag); + var scriptElement = doc.getElementsByTagName(tag)[0]; + script.src = pathtoroot + path; + scriptElement.parentNode.insertBefore(script, scriptElement); +} + +function show(tableId, selected, columns) { + if (tableId !== selected) { + document.querySelectorAll('div.' + tableId + ':not(.' + selected + ')') + .forEach(function(elem) { + elem.style.display = 'none'; + }); + } + document.querySelectorAll('div.' + selected) + .forEach(function(elem, index) { + elem.style.display = ''; + var isEvenRow = index % (columns * 2) < columns; + elem.classList.remove(isEvenRow ? oddRowColor : evenRowColor); + elem.classList.add(isEvenRow ? evenRowColor : oddRowColor); + }); + updateTabs(tableId, selected); +} + +function updateTabs(tableId, selected) { + document.querySelector('div#' + tableId +' .summary-table') + .setAttribute('aria-labelledby', selected); + document.querySelectorAll('button[id^="' + tableId + '"]') + .forEach(function(tab, index) { + if (selected === tab.id || (tableId === selected && index === 0)) { + tab.className = activeTableTab; + tab.setAttribute('aria-selected', true); + tab.setAttribute('tabindex',0); + } else { + tab.className = tableTab; + tab.setAttribute('aria-selected', false); + tab.setAttribute('tabindex',-1); + } + }); +} + +function switchTab(e) { + var selected = document.querySelector('[aria-selected=true]'); + if (selected) { + if ((e.keyCode === 37 || e.keyCode === 38) && selected.previousSibling) { + // left or up arrow key pressed: move focus to previous tab + selected.previousSibling.click(); + selected.previousSibling.focus(); + e.preventDefault(); + } else if ((e.keyCode === 39 || e.keyCode === 40) && selected.nextSibling) { + // right or down arrow key pressed: move focus to next tab + selected.nextSibling.click(); + selected.nextSibling.focus(); + e.preventDefault(); + } + } +} + +var updateSearchResults = function() {}; + +function indexFilesLoaded() { + return moduleSearchIndex + && packageSearchIndex + && typeSearchIndex + && memberSearchIndex + && tagSearchIndex; +} + +// Workaround for scroll position not being included in browser history (8249133) +document.addEventListener("DOMContentLoaded", function(e) { + var contentDiv = document.querySelector("div.flex-content"); + window.addEventListener("popstate", function(e) { + if (e.state !== null) { + contentDiv.scrollTop = e.state; + } + }); + window.addEventListener("hashchange", function(e) { + history.replaceState(contentDiv.scrollTop, document.title); + }); + contentDiv.addEventListener("scroll", function(e) { + var timeoutID; + if (!timeoutID) { + timeoutID = setTimeout(function() { + history.replaceState(contentDiv.scrollTop, document.title); + timeoutID = null; + }, 100); + } + }); + if (!location.hash) { + history.replaceState(contentDiv.scrollTop, document.title); + } +}); diff --git a/livraison/doc/client/search.js b/livraison/doc/client/search.js new file mode 100644 index 0000000..13aba85 --- /dev/null +++ b/livraison/doc/client/search.js @@ -0,0 +1,354 @@ +/* + * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ + +var noResult = {l: "No results found"}; +var loading = {l: "Loading search index..."}; +var catModules = "Modules"; +var catPackages = "Packages"; +var catTypes = "Classes and Interfaces"; +var catMembers = "Members"; +var catSearchTags = "Search Tags"; +var highlight = "$&"; +var searchPattern = ""; +var fallbackPattern = ""; +var RANKING_THRESHOLD = 2; +var NO_MATCH = 0xffff; +var MIN_RESULTS = 3; +var MAX_RESULTS = 500; +var UNNAMED = ""; +function escapeHtml(str) { + return str.replace(//g, ">"); +} +function getHighlightedText(item, matcher, fallbackMatcher) { + var escapedItem = escapeHtml(item); + var highlighted = escapedItem.replace(matcher, highlight); + if (highlighted === escapedItem) { + highlighted = escapedItem.replace(fallbackMatcher, highlight) + } + return highlighted; +} +function getURLPrefix(ui) { + var urlPrefix=""; + var slash = "/"; + if (ui.item.category === catModules) { + return ui.item.l + slash; + } else if (ui.item.category === catPackages && ui.item.m) { + return ui.item.m + slash; + } else if (ui.item.category === catTypes || ui.item.category === catMembers) { + if (ui.item.m) { + urlPrefix = ui.item.m + slash; + } else { + $.each(packageSearchIndex, function(index, item) { + if (item.m && ui.item.p === item.l) { + urlPrefix = item.m + slash; + } + }); + } + } + return urlPrefix; +} +function createSearchPattern(term) { + var pattern = ""; + var isWordToken = false; + term.replace(/,\s*/g, ", ").trim().split(/\s+/).forEach(function(w, index) { + if (index > 0) { + // whitespace between identifiers is significant + pattern += (isWordToken && /^\w/.test(w)) ? "\\s+" : "\\s*"; + } + var tokens = w.split(/(?=[A-Z,.()<>[\/])/); + for (var i = 0; i < tokens.length; i++) { + var s = tokens[i]; + if (s === "") { + continue; + } + pattern += $.ui.autocomplete.escapeRegex(s); + isWordToken = /\w$/.test(s); + if (isWordToken) { + pattern += "([a-z0-9_$<>\\[\\]]*?)"; + } + } + }); + return pattern; +} +function createMatcher(pattern, flags) { + var isCamelCase = /[A-Z]/.test(pattern); + return new RegExp(pattern, flags + (isCamelCase ? "" : "i")); +} +var watermark = 'Search'; +$(function() { + var search = $("#search-input"); + var reset = $("#reset-button"); + search.val(''); + search.prop("disabled", false); + reset.prop("disabled", false); + search.val(watermark).addClass('watermark'); + search.blur(function() { + if ($(this).val().length === 0) { + $(this).val(watermark).addClass('watermark'); + } + }); + search.on('click keydown paste', function() { + if ($(this).val() === watermark) { + $(this).val('').removeClass('watermark'); + } + }); + reset.click(function() { + search.val('').focus(); + }); + search.focus()[0].setSelectionRange(0, 0); +}); +$.widget("custom.catcomplete", $.ui.autocomplete, { + _create: function() { + this._super(); + this.widget().menu("option", "items", "> :not(.ui-autocomplete-category)"); + }, + _renderMenu: function(ul, items) { + var rMenu = this; + var currentCategory = ""; + rMenu.menu.bindings = $(); + $.each(items, function(index, item) { + var li; + if (item.category && item.category !== currentCategory) { + ul.append("
    • " + item.category + "
    • "); + currentCategory = item.category; + } + li = rMenu._renderItemData(ul, item); + if (item.category) { + li.attr("aria-label", item.category + " : " + item.l); + li.attr("class", "result-item"); + } else { + li.attr("aria-label", item.l); + li.attr("class", "result-item"); + } + }); + }, + _renderItem: function(ul, item) { + var label = ""; + var matcher = createMatcher(escapeHtml(searchPattern), "g"); + var fallbackMatcher = new RegExp(fallbackPattern, "gi") + if (item.category === catModules) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catPackages) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catTypes) { + label = (item.p && item.p !== UNNAMED) + ? getHighlightedText(item.p + "." + item.l, matcher, fallbackMatcher) + : getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catMembers) { + label = (item.p && item.p !== UNNAMED) + ? getHighlightedText(item.p + "." + item.c + "." + item.l, matcher, fallbackMatcher) + : getHighlightedText(item.c + "." + item.l, matcher, fallbackMatcher); + } else if (item.category === catSearchTags) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else { + label = item.l; + } + var li = $("
    • ").appendTo(ul); + var div = $("
      ").appendTo(li); + if (item.category === catSearchTags && item.h) { + if (item.d) { + div.html(label + " (" + item.h + ")
      " + + item.d + "
      "); + } else { + div.html(label + " (" + item.h + ")"); + } + } else { + if (item.m) { + div.html(item.m + "/" + label); + } else { + div.html(label); + } + } + return li; + } +}); +function rankMatch(match, category) { + if (!match) { + return NO_MATCH; + } + var index = match.index; + var input = match.input; + var leftBoundaryMatch = 2; + var periferalMatch = 0; + // make sure match is anchored on a left word boundary + if (index === 0 || /\W/.test(input[index - 1]) || "_" === input[index]) { + leftBoundaryMatch = 0; + } else if ("_" === input[index - 1] || (input[index] === input[index].toUpperCase() && !/^[A-Z0-9_$]+$/.test(input))) { + leftBoundaryMatch = 1; + } + var matchEnd = index + match[0].length; + var leftParen = input.indexOf("("); + var endOfName = leftParen > -1 ? leftParen : input.length; + // exclude peripheral matches + if (category !== catModules && category !== catSearchTags) { + var delim = category === catPackages ? "/" : "."; + if (leftParen > -1 && leftParen < index) { + periferalMatch += 2; + } else if (input.lastIndexOf(delim, endOfName) >= matchEnd) { + periferalMatch += 2; + } + } + var delta = match[0].length === endOfName ? 0 : 1; // rank full match higher than partial match + for (var i = 1; i < match.length; i++) { + // lower ranking if parts of the name are missing + if (match[i]) + delta += match[i].length; + } + if (category === catTypes) { + // lower ranking if a type name contains unmatched camel-case parts + if (/[A-Z]/.test(input.substring(matchEnd))) + delta += 5; + if (/[A-Z]/.test(input.substring(0, index))) + delta += 5; + } + return leftBoundaryMatch + periferalMatch + (delta / 200); + +} +function doSearch(request, response) { + var result = []; + searchPattern = createSearchPattern(request.term); + fallbackPattern = createSearchPattern(request.term.toLowerCase()); + if (searchPattern === "") { + return this.close(); + } + var camelCaseMatcher = createMatcher(searchPattern, ""); + var fallbackMatcher = new RegExp(fallbackPattern, "i"); + + function searchIndexWithMatcher(indexArray, matcher, category, nameFunc) { + if (indexArray) { + var newResults = []; + $.each(indexArray, function (i, item) { + item.category = category; + var ranking = rankMatch(matcher.exec(nameFunc(item)), category); + if (ranking < RANKING_THRESHOLD) { + newResults.push({ranking: ranking, item: item}); + } + return newResults.length <= MAX_RESULTS; + }); + return newResults.sort(function(e1, e2) { + return e1.ranking - e2.ranking; + }).map(function(e) { + return e.item; + }); + } + return []; + } + function searchIndex(indexArray, category, nameFunc) { + var primaryResults = searchIndexWithMatcher(indexArray, camelCaseMatcher, category, nameFunc); + result = result.concat(primaryResults); + if (primaryResults.length <= MIN_RESULTS && !camelCaseMatcher.ignoreCase) { + var secondaryResults = searchIndexWithMatcher(indexArray, fallbackMatcher, category, nameFunc); + result = result.concat(secondaryResults.filter(function (item) { + return primaryResults.indexOf(item) === -1; + })); + } + } + + searchIndex(moduleSearchIndex, catModules, function(item) { return item.l; }); + searchIndex(packageSearchIndex, catPackages, function(item) { + return (item.m && request.term.indexOf("/") > -1) + ? (item.m + "/" + item.l) : item.l; + }); + searchIndex(typeSearchIndex, catTypes, function(item) { + return request.term.indexOf(".") > -1 ? item.p + "." + item.l : item.l; + }); + searchIndex(memberSearchIndex, catMembers, function(item) { + return request.term.indexOf(".") > -1 + ? item.p + "." + item.c + "." + item.l : item.l; + }); + searchIndex(tagSearchIndex, catSearchTags, function(item) { return item.l; }); + + if (!indexFilesLoaded()) { + updateSearchResults = function() { + doSearch(request, response); + } + result.unshift(loading); + } else { + updateSearchResults = function() {}; + } + response(result); +} +$(function() { + $("#search-input").catcomplete({ + minLength: 1, + delay: 300, + source: doSearch, + response: function(event, ui) { + if (!ui.content.length) { + ui.content.push(noResult); + } else { + $("#search-input").empty(); + } + }, + autoFocus: true, + focus: function(event, ui) { + return false; + }, + position: { + collision: "flip" + }, + select: function(event, ui) { + if (ui.item.category) { + var url = getURLPrefix(ui); + if (ui.item.category === catModules) { + url += "module-summary.html"; + } else if (ui.item.category === catPackages) { + if (ui.item.u) { + url = ui.item.u; + } else { + url += ui.item.l.replace(/\./g, '/') + "/package-summary.html"; + } + } else if (ui.item.category === catTypes) { + if (ui.item.u) { + url = ui.item.u; + } else if (ui.item.p === UNNAMED) { + url += ui.item.l + ".html"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.l + ".html"; + } + } else if (ui.item.category === catMembers) { + if (ui.item.p === UNNAMED) { + url += ui.item.c + ".html" + "#"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.c + ".html" + "#"; + } + if (ui.item.u) { + url += ui.item.u; + } else { + url += ui.item.l; + } + } else if (ui.item.category === catSearchTags) { + url += ui.item.u; + } + if (top !== window) { + parent.classFrame.location = pathtoroot + url; + } else { + window.location.href = pathtoroot + url; + } + $("#search-input").focus(); + } + } + }); +}); diff --git a/livraison/doc/client/stylesheet.css b/livraison/doc/client/stylesheet.css new file mode 100644 index 0000000..836c62d --- /dev/null +++ b/livraison/doc/client/stylesheet.css @@ -0,0 +1,865 @@ +/* + * Javadoc style sheet + */ + +@import url('resources/fonts/dejavu.css'); + +/* + * Styles for individual HTML elements. + * + * These are styles that are specific to individual HTML elements. Changing them affects the style of a particular + * HTML element throughout the page. + */ + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; + padding:0; + height:100%; + width:100%; +} +iframe { + margin:0; + padding:0; + height:100%; + width:100%; + overflow-y:scroll; + border:none; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a[href]:hover, a[href]:focus { + text-decoration:none; + color:#bb7a2a; +} +a[name] { + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; +} +h4 { + font-size:15px; +} +h5 { + font-size:14px; +} +h6 { + font-size:13px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; +} +:not(h1, h2, h3, h4, h5, h6) > code, +:not(h1, h2, h3, h4, h5, h6) > tt { + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +.summary-table dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +button { + font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size: 14px; +} +/* + * Styles for HTML generated by javadoc. + * + * These are style classes that are used by the standard doclet to generate HTML documentation. + */ + +/* + * Styles for document title and copyright. + */ +.clear { + clear:both; + height:0; + overflow:hidden; +} +.about-language { + float:right; + padding:0 21px 8px 8px; + font-size:11px; + margin-top:-9px; + height:2.9em; +} +.legal-copy { + margin-left:.5em; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* + * Styles for navigation bar. + */ +@media screen { + .flex-box { + position:fixed; + display:flex; + flex-direction:column; + height: 100%; + width: 100%; + } + .flex-header { + flex: 0 0 auto; + } + .flex-content { + flex: 1 1 auto; + overflow-y: auto; + } +} +.top-nav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + min-height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.sub-nav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.sub-nav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +.sub-nav .nav-list { + padding-top:5px; +} +ul.nav-list { + display:block; + margin:0 25px 0 0; + padding:0; +} +ul.sub-nav-list { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.nav-list li { + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +.sub-nav .nav-list-search { + float:right; + margin:0 0 0 0; + padding:5px 6px; + clear:none; +} +.nav-list-search label { + position:relative; + right:-16px; +} +ul.sub-nav-list li { + list-style:none; + float:left; + padding-top:10px; +} +.top-nav a:link, .top-nav a:active, .top-nav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.top-nav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.nav-bar-cell1-rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skip-nav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* + * Hide navigation links and search box in print layout + */ +@media print { + ul.nav-list, div.sub-nav { + display:none; + } +} +/* + * Styles for page header and footer. + */ +.title { + color:#2c4557; + margin:10px 0; +} +.sub-title { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* + * Styles for headings. + */ +body.class-declaration-page .summary h2, +body.class-declaration-page .details h2, +body.class-use-page h2, +body.module-declaration-page .block-list h2 { + font-style: italic; + padding:0; + margin:15px 0; +} +body.class-declaration-page .summary h3, +body.class-declaration-page .details h3, +body.class-declaration-page .summary .inherited-list h2 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +/* + * Styles for page layout containers. + */ +main { + clear:both; + padding:10px 20px; + position:relative; +} +dl.notes > dt { + font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +dl.notes > dd { + margin:5px 10px 10px 0; + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +dl.name-value > dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +dl.name-value > dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* + * Styles for lists. + */ +li.circle { + list-style:circle; +} +ul.horizontal li { + display:inline; + font-size:0.9em; +} +div.inheritance { + margin:0; + padding:0; +} +div.inheritance div.inheritance { + margin-left:2em; +} +ul.block-list, +ul.details-list, +ul.member-list, +ul.summary-list { + margin:10px 0 10px 0; + padding:0; +} +ul.block-list > li, +ul.details-list > li, +ul.member-list > li, +ul.summary-list > li { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +.summary-table dl, .summary-table dl dt, .summary-table dl dd { + margin-top:0; + margin-bottom:1px; +} +ul.see-list, ul.see-list-long { + padding-left: 0; + list-style: none; +} +ul.see-list li { + display: inline; +} +ul.see-list li:not(:last-child):after, +ul.see-list-long li:not(:last-child):after { + content: ", "; + white-space: pre-wrap; +} +/* + * Styles for tables. + */ +.summary-table, .details-table { + width:100%; + border-spacing:0; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; + padding:0; +} +.caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0; + padding-top:10px; + padding-left:1px; + margin:0; + white-space:pre; +} +.caption a:link, .caption a:visited { + color:#1f389c; +} +.caption a:hover, +.caption a:active { + color:#FFFFFF; +} +.caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +div.table-tabs { + padding:10px 0 0 1px; + margin:0; +} +div.table-tabs > button { + border: none; + cursor: pointer; + padding: 5px 12px 7px 12px; + font-weight: bold; + margin-right: 3px; +} +div.table-tabs > button.active-table-tab { + background: #F8981D; + color: #253441; +} +div.table-tabs > button.table-tab { + background: #4D7A97; + color: #FFFFFF; +} +.two-column-summary { + display: grid; + grid-template-columns: minmax(15%, max-content) minmax(15%, auto); +} +.three-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(15%, max-content) minmax(15%, auto); +} +.four-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(10%, max-content) minmax(10%, max-content) minmax(10%, auto); +} +@media screen and (max-width: 600px) { + .two-column-summary { + display: grid; + grid-template-columns: 1fr; + } +} +@media screen and (max-width: 800px) { + .three-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(25%, auto); + } + .three-column-summary .col-last { + grid-column-end: span 2; + } +} +@media screen and (max-width: 1000px) { + .four-column-summary { + display: grid; + grid-template-columns: minmax(15%, max-content) minmax(15%, auto); + } +} +.summary-table > div, .details-table > div { + text-align:left; + padding: 8px 3px 3px 7px; +} +.col-first, .col-second, .col-last, .col-constructor-name, .col-summary-item-name { + vertical-align:top; + padding-right:0; + padding-top:8px; + padding-bottom:3px; +} +.table-header { + background:#dee3e9; + font-weight: bold; +} +.col-first, .col-first { + font-size:13px; +} +.col-second, .col-second, .col-last, .col-constructor-name, .col-summary-item-name, .col-last { + font-size:13px; +} +.col-first, .col-second, .col-constructor-name { + vertical-align:top; + overflow: auto; +} +.col-last { + white-space:normal; +} +.col-first a:link, .col-first a:visited, +.col-second a:link, .col-second a:visited, +.col-first a:link, .col-first a:visited, +.col-second a:link, .col-second a:visited, +.col-constructor-name a:link, .col-constructor-name a:visited, +.col-summary-item-name a:link, .col-summary-item-name a:visited, +.constant-values-container a:link, .constant-values-container a:visited, +.all-classes-container a:link, .all-classes-container a:visited, +.all-packages-container a:link, .all-packages-container a:visited { + font-weight:bold; +} +.table-sub-heading-color { + background-color:#EEEEFF; +} +.even-row-color, .even-row-color .table-header { + background-color:#FFFFFF; +} +.odd-row-color, .odd-row-color .table-header { + background-color:#EEEEEF; +} +/* + * Styles for contents. + */ +.deprecated-content { + margin:0; + padding:10px 0; +} +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +.col-last div { + padding-top:0; +} +.col-last a { + padding-bottom:3px; +} +.module-signature, +.package-signature, +.type-signature, +.member-signature { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + margin:14px 0; + white-space: pre-wrap; +} +.module-signature, +.package-signature, +.type-signature { + margin-top: 0; +} +.member-signature .type-parameters-long, +.member-signature .parameters, +.member-signature .exceptions { + display: inline-block; + vertical-align: top; + white-space: pre; +} +.member-signature .type-parameters { + white-space: normal; +} +/* + * Styles for formatting effect. + */ +.source-line-no { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:0 10px 5px 0; + color:#474747; +} +.deprecated-label, .descfrm-type-label, .implementation-label, .member-name-label, .member-name-link, +.module-label-in-package, .module-label-in-type, .override-specify-label, .package-label-in-type, +.package-hierarchy-label, .type-name-label, .type-name-link, .search-tag-link, .preview-label { + font-weight:bold; +} +.deprecation-comment, .help-footnote, .preview-comment { + font-style:italic; +} +.deprecation-block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; + border-style:solid; + border-width:thin; + border-radius:10px; + padding:10px; + margin-bottom:10px; + margin-right:10px; + display:inline-block; +} +.preview-block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; + border-style:solid; + border-width:thin; + border-radius:10px; + padding:10px; + margin-bottom:10px; + margin-right:10px; + display:inline-block; +} +div.block div.deprecation-comment { + font-style:normal; +} +/* + * Styles specific to HTML5 elements. + */ +main, nav, header, footer, section { + display:block; +} +/* + * Styles for javadoc search. + */ +.ui-autocomplete-category { + font-weight:bold; + font-size:15px; + padding:7px 0 7px 3px; + background-color:#4D7A97; + color:#FFFFFF; +} +.result-item { + font-size:13px; +} +.ui-autocomplete { + max-height:85%; + max-width:65%; + overflow-y:scroll; + overflow-x:scroll; + white-space:nowrap; + box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); +} +ul.ui-autocomplete { + position:fixed; + z-index:999999; +} +ul.ui-autocomplete li { + float:left; + clear:both; + width:100%; +} +.result-highlight { + font-weight:bold; +} +#search-input { + background-image:url('resources/glass.png'); + background-size:13px; + background-repeat:no-repeat; + background-position:2px 3px; + padding-left:20px; + position:relative; + right:-18px; + width:400px; +} +#reset-button { + background-color: rgb(255,255,255); + background-image:url('resources/x.png'); + background-position:center; + background-repeat:no-repeat; + background-size:12px; + border:0 none; + width:16px; + height:16px; + position:relative; + left:-4px; + top:-4px; + font-size:0px; +} +.watermark { + color:#545454; +} +.search-tag-desc-result { + font-style:italic; + font-size:11px; +} +.search-tag-holder-result { + font-style:italic; + font-size:12px; +} +.search-tag-result:target { + background-color:yellow; +} +.module-graph span { + display:none; + position:absolute; +} +.module-graph:hover span { + display:block; + margin: -100px 0 0 100px; + z-index: 1; +} +.inherited-list { + margin: 10px 0 10px 0; +} +section.class-description { + line-height: 1.4; +} +.summary section[class$="-summary"], .details section[class$="-details"], +.class-uses .detail, .serialized-class-details { + padding: 0px 20px 5px 10px; + border: 1px solid #ededed; + background-color: #f8f8f8; +} +.inherited-list, section[class$="-details"] .detail { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +.vertical-separator { + padding: 0 5px; +} +ul.help-section-list { + margin: 0; +} +ul.help-subtoc > li { + display: inline-block; + padding-right: 5px; + font-size: smaller; +} +ul.help-subtoc > li::before { + content: "\2022" ; + padding-right:2px; +} +span.help-note { + font-style: italic; +} +/* + * Indicator icon for external links. + */ +main a[href*="://"]::after { + content:""; + display:inline-block; + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); + background-size:100% 100%; + width:7px; + height:7px; + margin-left:2px; + margin-bottom:4px; +} +main a[href*="://"]:hover::after, +main a[href*="://"]:focus::after { + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); +} + +/* + * Styles for user-provided tables. + * + * borderless: + * No borders, vertical margins, styled caption. + * This style is provided for use with existing doc comments. + * In general, borderless tables should not be used for layout purposes. + * + * plain: + * Plain borders around table and cells, vertical margins, styled caption. + * Best for small tables or for complex tables for tables with cells that span + * rows and columns, when the "striped" style does not work well. + * + * striped: + * Borders around the table and vertical borders between cells, striped rows, + * vertical margins, styled caption. + * Best for tables that have a header row, and a body containing a series of simple rows. + */ + +table.borderless, +table.plain, +table.striped { + margin-top: 10px; + margin-bottom: 10px; +} +table.borderless > caption, +table.plain > caption, +table.striped > caption { + font-weight: bold; + font-size: smaller; +} +table.borderless th, table.borderless td, +table.plain th, table.plain td, +table.striped th, table.striped td { + padding: 2px 5px; +} +table.borderless, +table.borderless > thead > tr > th, table.borderless > tbody > tr > th, table.borderless > tr > th, +table.borderless > thead > tr > td, table.borderless > tbody > tr > td, table.borderless > tr > td { + border: none; +} +table.borderless > thead > tr, table.borderless > tbody > tr, table.borderless > tr { + background-color: transparent; +} +table.plain { + border-collapse: collapse; + border: 1px solid black; +} +table.plain > thead > tr, table.plain > tbody tr, table.plain > tr { + background-color: transparent; +} +table.plain > thead > tr > th, table.plain > tbody > tr > th, table.plain > tr > th, +table.plain > thead > tr > td, table.plain > tbody > tr > td, table.plain > tr > td { + border: 1px solid black; +} +table.striped { + border-collapse: collapse; + border: 1px solid black; +} +table.striped > thead { + background-color: #E3E3E3; +} +table.striped > thead > tr > th, table.striped > thead > tr > td { + border: 1px solid black; +} +table.striped > tbody > tr:nth-child(even) { + background-color: #EEE +} +table.striped > tbody > tr:nth-child(odd) { + background-color: #FFF +} +table.striped > tbody > tr > th, table.striped > tbody > tr > td { + border-left: 1px solid black; + border-right: 1px solid black; +} +table.striped > tbody > tr > th { + font-weight: normal; +} +/** + * Tweak font sizes and paddings for small screens. + */ +@media screen and (max-width: 1050px) { + #search-input { + width: 300px; + } +} +@media screen and (max-width: 800px) { + #search-input { + width: 200px; + } + .top-nav, + .bottom-nav { + font-size: 11px; + padding-top: 6px; + } + .sub-nav { + font-size: 11px; + } + .about-language { + padding-right: 16px; + } + ul.nav-list li, + .sub-nav .nav-list-search { + padding: 6px; + } + ul.sub-nav-list li { + padding-top: 5px; + } + main { + padding: 10px; + } + .summary section[class$="-summary"], .details section[class$="-details"], + .class-uses .detail, .serialized-class-details { + padding: 0 8px 5px 8px; + } + body { + -webkit-text-size-adjust: none; + } +} +@media screen and (max-width: 500px) { + #search-input { + width: 150px; + } + .top-nav, + .bottom-nav { + font-size: 10px; + } + .sub-nav { + font-size: 10px; + } + .about-language { + font-size: 10px; + padding-right: 12px; + } +} diff --git a/livraison/doc/client/tag-search-index.js b/livraison/doc/client/tag-search-index.js new file mode 100644 index 0000000..f2a440c --- /dev/null +++ b/livraison/doc/client/tag-search-index.js @@ -0,0 +1 @@ +tagSearchIndex = [{"l":"Constant Field Values","h":"","u":"constant-values.html"}];updateSearchResults(); \ No newline at end of file diff --git a/livraison/doc/client/type-search-index.js b/livraison/doc/client/type-search-index.js new file mode 100644 index 0000000..2af26a1 --- /dev/null +++ b/livraison/doc/client/type-search-index.js @@ -0,0 +1 @@ +typeSearchIndex = [{"p":"fr.lnl.game.client.view","l":"AbstractView"},{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"fr.lnl.game.client","l":"App"},{"p":"fr.lnl.game.client.view","l":"Cell"},{"p":"fr.lnl.game.client.listener","l":"ClientEventHandler"},{"p":"fr.lnl.game.client","l":"ClientPlayer"},{"p":"fr.lnl.game.client.listener","l":"DisplayWinnerEvent"},{"p":"fr.lnl.game.client.listener","l":"NextPlayerButtonListener"},{"p":"fr.lnl.game.client.listener","l":"SelectActionButton"},{"p":"fr.lnl.game.client.listener","l":"SelectDirectionListener"},{"p":"fr.lnl.game.client.view","l":"Terminal"},{"p":"fr.lnl.game.client.view","l":"View"},{"p":"fr.lnl.game.client","l":"ViewLambda"},{"p":"fr.lnl.game.client.view","l":"ViewManager"},{"p":"fr.lnl.game.client.view","l":"Window"}];updateSearchResults(); \ No newline at end of file diff --git a/livraison/doc/index.html b/livraison/doc/index.html new file mode 100644 index 0000000..bddf364 --- /dev/null +++ b/livraison/doc/index.html @@ -0,0 +1,15 @@ + + + + + Javadoc + + +

      Accéder aux javadocs de nos modules

      +
      + + + diff --git a/livraison/doc/server/allclasses-index.html b/livraison/doc/server/allclasses-index.html new file mode 100644 index 0000000..d7ca8e0 --- /dev/null +++ b/livraison/doc/server/allclasses-index.html @@ -0,0 +1,224 @@ + + + + +All Classes and Interfaces (server API) + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      All Classes and Interfaces

      +
      +
      +
      +
      +
      +
      Class
      +
      Description
      + +
       
      + +
      +
      AbstractBox is instantiable (not an abstract class), but when it's the case, instance doesn't represent anything, + it's only to see if there is a lock on this position or not
      +
      + +
       
      + +
       
      + +
       
      + +
       
      + +
      +
      Bomb are elements which explode when someone walks on it or after a countdown, the explosion area is on multiple cases
      +
      + +
       
      + +
      +
      ClassPlayer contains all data about the cost of an action or the cost of a damage
      +
      + +
      +
      Super class of all Computer players
      +
      + +
      +
      A box implemented by CountdownBox is a box which do an action a certain time after being placed
      +
      + +
      +
      Represent an unrecoverable error in the program, force program to stop
      +
      + +
      +
      Used when a player want to protect himself from taking damage (shield state is reset to false at next player turn)
      +
      + +
       
      + +
      +
      Enum used to chose where to move, shot, etc.
      +
      + +
       
      + +
      +
      Used when player want to drop a Bomb, bomb explode when someone walks on it and after 3 turns
      +
      + +
      +
      Used when player want to drop a Mine, Mine only explode when someone walks on it
      +
      + +
      +
      Super class used by DropMine and DropBomb
      +
      + +
      +
      An EnergyBall is a box which give back a bit of player energy after it walks on the ball
      +
      + +
      +
      Contain everything related to error messages, theirs errors are the fault of the end-user (like we demand an integer + and user give us a floating point number + Theirs error doesn't cause the program to stop, it'll demand a correct value
      +
      + +
      +
      Super class of Bomb and Mine
      +
      + +
       
      + +
       
      + +
      +
      Class managing the board
      +
      + +
      +
      Factory pattern
      +
      + +
      +
      Instance of Human Player.
      + A human player choose an action to execute by using mouse or keyboard.
      + Human Player don't implement choseAction cause this method is executed on client part
      +
      + +
      +
      A box implemented by InteractiveBox is a box which do an action when someone walks on it
      +
      + +
       
      + +
       
      + +
      +
      A mine is an element which explose when someone walks on it, the explosion area is on 1 case only
      +
      + +
      +
      Model implemented by AbstractModelListening
      +
      + +
      +
      Used when the player want to move in a direction, it can move in a direction when there is another player or a wall
      +
      + +
      +
      This exception is throw when player has no remaining bullet
      +
      + +
      +
      This action is used when player doesn't want to move and/or loose energy
      +
      + +
      +
      throw when action instantiated and the chosen direction in constructor isn't valid
      +
      + +
      +
      Tuple associating storing two value of undefined type.
      + Unlike Python, value in this Tuple can be modified (but the type of its new value need to be the same)
      +
      + +
       
      + +
      +
      Point extends from Pair, basically a simpler ways to use Pair when using grid position
      +
      + +
       
      + +
      +
      When we generate action, we generate one per available direction (like in Move) but to improve human + readability, we list every same Action here
      +
      + +
       
      + +
       
      + +
       
      + +
      +
      A wall is an intraversable object
      +
      + +
       
      +
      +
      +
      +
      +
      +
      + + diff --git a/livraison/doc/server/allpackages-index.html b/livraison/doc/server/allpackages-index.html new file mode 100644 index 0000000..f7fe9a3 --- /dev/null +++ b/livraison/doc/server/allpackages-index.html @@ -0,0 +1,102 @@ + + + + +All Packages (server API) + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      All Packages

      +
      +
      Package Summary
      +
      +
      Package
      +
      Description
      + +
      +
      Server package
      +
      + +
      +
      Game package, contains all classes and sub-packages mainly related game works
      +
      + +
      +
      Package storing all actions a player can do
      +
      + +
      +
      Package containing all about Grid components
      +
      + +
      +
      Package containing all about Grid construction
      +
      + +
      +
      Package containing all the elements that can be arranged in a grid
      +
      + +
      +
      Package storing all players classes and as well AI behavior
      +
      + +
      +
      Package containing all bout player's weapons
      +
      + +
      +
      Package containing model of listener to implement + Used by listeners in client module
      +
      + +
      +
      Package containing all utility classes
      +
      +
      +
      +
      +
      + + diff --git a/livraison/doc/server/constant-values.html b/livraison/doc/server/constant-values.html new file mode 100644 index 0000000..3b04636 --- /dev/null +++ b/livraison/doc/server/constant-values.html @@ -0,0 +1,91 @@ + + + + +Constant Field Values (server API) + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      Constant Field Values

      +
      +

      Contents

      + +
      +
      +
      +

      fr.lnl.*

      +
        +
      • +
        fr.lnl.game.server.games.grid.elements.Bomb
        +
        +
        Modifier and Type
        +
        Constant Field
        +
        Value
        +
        private static final int
        + +
        2
        +
        +
      • +
      +
        +
      • +
        fr.lnl.game.server.utils.ErrorMessage
        +
        +
        Modifier and Type
        +
        Constant Field
        +
        Value
        +
        public static final String
        + +
        "\u001b[0;31mErreur de saisie\u001b[0m : "
        +
        +
      • +
      +
      +
      +
      +
      + + diff --git a/livraison/doc/server/element-list b/livraison/doc/server/element-list new file mode 100644 index 0000000..549341f --- /dev/null +++ b/livraison/doc/server/element-list @@ -0,0 +1,11 @@ +module:server +fr.lnl.game.server +fr.lnl.game.server.games +fr.lnl.game.server.games.action +fr.lnl.game.server.games.grid +fr.lnl.game.server.games.grid.build +fr.lnl.game.server.games.grid.elements +fr.lnl.game.server.games.player +fr.lnl.game.server.games.weapon +fr.lnl.game.server.listener +fr.lnl.game.server.utils diff --git a/livraison/doc/server/help-doc.html b/livraison/doc/server/help-doc.html new file mode 100644 index 0000000..194ace9 --- /dev/null +++ b/livraison/doc/server/help-doc.html @@ -0,0 +1,190 @@ + + + + +API Help (server API) + + + + + + + + + + + + + + +
      + +
      +
      +

      JavaDoc Help

      + +
      +
      +

      Navigation

      +Starting from the Overview page, you can browse the documentation using the links in each page, and in the navigation bar at the top of each page. The Index and Search box allow you to navigate to specific declarations and summary pages, including: All Packages, All Classes and Interfaces + +
      +
      +
      +

      Kinds of Pages

      +The following sections describe the different kinds of pages in this collection. +
      +

      Module

      +

      Each module has a page that contains a list of its packages, dependencies on other modules, and services, with a summary for each. These pages may contain the following categories:

      +
        +
      • Packages
      • +
      • Modules
      • +
      • Services
      • +
      +
      +
      +

      Package

      +

      Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:

      +
        +
      • Interfaces
      • +
      • Classes
      • +
      • Enum Classes
      • +
      • Exceptions
      • +
      • Errors
      • +
      • Annotation Interfaces
      • +
      +
      +
      +

      Class or Interface

      +

      Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.

      +
        +
      • Class Inheritance Diagram
      • +
      • Direct Subclasses
      • +
      • All Known Subinterfaces
      • +
      • All Known Implementing Classes
      • +
      • Class or Interface Declaration
      • +
      • Class or Interface Description
      • +
      +
      +
        +
      • Nested Class Summary
      • +
      • Enum Constant Summary
      • +
      • Field Summary
      • +
      • Property Summary
      • +
      • Constructor Summary
      • +
      • Method Summary
      • +
      • Required Element Summary
      • +
      • Optional Element Summary
      • +
      +
      +
        +
      • Enum Constant Details
      • +
      • Field Details
      • +
      • Property Details
      • +
      • Constructor Details
      • +
      • Method Details
      • +
      • Element Details
      • +
      +

      Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.

      +

      The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

      +
      +
      +

      Other Files

      +

      Packages and modules may contain pages with additional information related to the declarations nearby.

      +
      +
      +

      Tree (Class Hierarchy)

      +

      There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.

      +
        +
      • When viewing the Overview page, clicking on TREE displays the hierarchy for all packages.
      • +
      • When viewing a particular package, class or interface page, clicking on TREE displays the hierarchy for only that package.
      • +
      +
      +
      +

      Constant Field Values

      +

      The Constant Field Values page lists the static final fields and their values.

      +
      +
      +

      Serialized Form

      +

      Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to those who implement rather than use the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See Also" section of the class description.

      +
      +
      +

      All Packages

      +

      The All Packages page contains an alphabetic index of all packages contained in the documentation.

      +
      +
      +

      All Classes and Interfaces

      +

      The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.

      +
      +
      +

      Index

      +

      The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.

      +
      +
      +
      +This help file applies to API documentation generated by the standard doclet.
      +
      +
      + + diff --git a/livraison/doc/server/index-all.html b/livraison/doc/server/index-all.html new file mode 100644 index 0000000..ced5fb0 --- /dev/null +++ b/livraison/doc/server/index-all.html @@ -0,0 +1,1090 @@ + + + + +Index (server API) + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      Index

      +
      +A B C D E F G H I L M N P R S T U V W 
      All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form +

      A

      +
      +
      a - Variable in class fr.lnl.game.server.utils.Pair
      +
       
      +
      AbstractAction - Class in fr.lnl.game.server.games.action
      +
       
      +
      AbstractAction(Game, Player) - Constructor for class fr.lnl.game.server.games.action.AbstractAction
      +
       
      +
      AbstractBox - Class in fr.lnl.game.server.games.grid.elements
      +
      +
      AbstractBox is instantiable (not an abstract class), but when it's the case, instance doesn't represent anything, + it's only to see if there is a lock on this position or not
      +
      +
      AbstractBox() - Constructor for class fr.lnl.game.server.games.grid.elements.AbstractBox
      +
       
      +
      AbstractGridFactoryBuilder - Class in fr.lnl.game.server.games.grid.build
      +
       
      +
      AbstractGridFactoryBuilder() - Constructor for class fr.lnl.game.server.games.grid.build.AbstractGridFactoryBuilder
      +
       
      +
      AbstractModelListening - Class in fr.lnl.game.server.listener
      +
       
      +
      AbstractModelListening() - Constructor for class fr.lnl.game.server.listener.AbstractModelListening
      +
       
      +
      AbstractPlayer - Class in fr.lnl.game.server.games.player
      +
       
      +
      AbstractPlayer(Integer, Point, boolean, ClassPlayer) - Constructor for class fr.lnl.game.server.games.player.AbstractPlayer
      +
       
      +
      Action - Interface in fr.lnl.game.server.games.action
      +
       
      +
      actionName - Variable in class fr.lnl.game.server.games.action.ReunionSameAction
      +
       
      +
      actions - Variable in class fr.lnl.game.server.games.action.ReunionSameAction
      +
       
      +
      actions - Variable in class fr.lnl.game.server.games.player.AbstractPlayer
      +
       
      +
      addAction(Action) - Method in class fr.lnl.game.server.games.action.ReunionSameAction
      +
       
      +
      addListener(ModelListener) - Method in class fr.lnl.game.server.listener.AbstractModelListening
      +
       
      +
      +

      B

      +
      +
      b - Variable in class fr.lnl.game.server.utils.Pair
      +
       
      +
      board - Variable in class fr.lnl.game.server.games.grid.Grid
      +
       
      +
      boardPositionIsValid(int, int) - Method in class fr.lnl.game.server.games.grid.Grid
      +
      +
      Check if given position is in grid area
      +
      +
      boardPositionIsValid(int, int, int, int) - Method in class fr.lnl.game.server.games.grid.Grid
      +
       
      +
      boardPositionIsValid(Point) - Method in class fr.lnl.game.server.games.grid.Grid
      +
       
      +
      Bomb - Class in fr.lnl.game.server.games.grid.elements
      +
      +
      Bomb are elements which explode when someone walks on it or after a countdown, the explosion area is on multiple cases
      +
      +
      Bomb(Point, Game) - Constructor for class fr.lnl.game.server.games.grid.elements.Bomb
      +
       
      +
      bombCost - Variable in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      Box - Interface in fr.lnl.game.server.games.grid.elements
      +
       
      +
      build() - Method in class fr.lnl.game.server.games.grid.build.AbstractGridFactoryBuilder
      +
      + +
      +
      build() - Method in interface fr.lnl.game.server.games.grid.build.GridFactoryBuilder
      +
      +
      Call this method after you call {GridFactoryBuilder.energyProbability(float)}, + GridFactoryBuilder.wallProbability(float), GridFactoryBuilder.gridDimensions(int, int) and + GridFactoryBuilder.playersList(List), It'll instantiate a new Grid and initialize his components + like border walls, intern walls, and energy using parameters given previously
      +
      +
      bullet - Variable in class fr.lnl.game.server.games.weapon.Firearm
      +
       
      +
      +

      C

      +
      +
      choseAction(Game) - Method in class fr.lnl.game.server.games.player.ComputerPlayer
      +
      +
      Call when an AI need to choose an action to execute
      +
      +
      choseDeployShield(Game) - Method in class fr.lnl.game.server.games.player.StrategyComputerPlayer
      +
       
      +
      choseExplosive(List<ReunionSameAction>) - Method in class fr.lnl.game.server.games.player.StrategyComputerPlayer
      +
       
      +
      choseMove(List<ReunionSameAction>, Game) - Method in class fr.lnl.game.server.games.player.StrategyComputerPlayer
      +
       
      +
      choseShot(List<ReunionSameAction>, Game) - Method in class fr.lnl.game.server.games.player.StrategyComputerPlayer
      +
       
      +
      classPlayer - Variable in class fr.lnl.game.server.games.player.AbstractPlayer
      +
       
      +
      ClassPlayer - Enum Class in fr.lnl.game.server.games.player
      +
      +
      ClassPlayer contains all data about the cost of an action or the cost of a damage
      +
      +
      ClassPlayer(int, int, int, int, int, int, int, int, int, int, Weapon) - Constructor for enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      column - Variable in class fr.lnl.game.server.games.grid.Grid
      +
       
      +
      columns - Variable in class fr.lnl.game.server.games.grid.build.AbstractGridFactoryBuilder
      +
       
      +
      ComputerPlayer - Class in fr.lnl.game.server.games.player
      +
      +
      Super class of all Computer players
      +
      +
      ComputerPlayer(Integer, Point, ClassPlayer) - Constructor for class fr.lnl.game.server.games.player.ComputerPlayer
      +
       
      +
      CountdownBox - Interface in fr.lnl.game.server.games.grid.elements
      +
      +
      A box implemented by CountdownBox is a box which do an action a certain time after being placed
      +
      +
      countdownGridElementsUpdate() - Method in class fr.lnl.game.server.games.Game
      +
      +
      play grid's elements that use a timer like Bomb at each game tick
      +
      +
      counter - Variable in class fr.lnl.game.server.games.grid.elements.Bomb
      +
      +
      Timer before explosion
      +
      +
      CrashException - Exception in fr.lnl.game.server.utils
      +
      +
      Represent an unrecoverable error in the program, force program to stop
      +
      +
      CrashException(String, Throwable) - Constructor for exception fr.lnl.game.server.utils.CrashException
      +
       
      +
      create() - Static method in class fr.lnl.game.server.games.grid.build.LockGridFactoryBuilder
      +
       
      +
      currentPlayer - Variable in class fr.lnl.game.server.games.Game
      +
       
      +
      +

      D

      +
      +
      decrementEnergy(int) - Method in class fr.lnl.game.server.games.player.AbstractPlayer
      +
       
      +
      decrementEnergy(int) - Method in interface fr.lnl.game.server.games.player.Player
      +
      +
      Call by the implementing classes Action to withdraw + a certain number of energy from a player
      +
      +
      DEFAULT - Enum constant in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      deltaX - Variable in enum class fr.lnl.game.server.games.action.Direction4Axis
      +
       
      +
      deltaX - Variable in enum class fr.lnl.game.server.games.action.Direction8Axis
      +
       
      +
      deltaY - Variable in enum class fr.lnl.game.server.games.action.Direction4Axis
      +
       
      +
      deltaY - Variable in enum class fr.lnl.game.server.games.action.Direction8Axis
      +
       
      +
      DeployShield - Class in fr.lnl.game.server.games.action
      +
      +
      Used when a player want to protect himself from taking damage (shield state is reset to false at next player turn)
      +
      +
      DeployShield(Player) - Constructor for class fr.lnl.game.server.games.action.DeployShield
      +
       
      +
      direction - Variable in class fr.lnl.game.server.games.action.DropObject
      +
       
      +
      direction - Variable in class fr.lnl.game.server.games.action.Move
      +
       
      +
      direction - Variable in class fr.lnl.game.server.games.action.Shot
      +
       
      +
      Direction - Interface in fr.lnl.game.server.games.action
      +
       
      +
      Direction4Axis - Enum Class in fr.lnl.game.server.games.action
      +
      +
      Enum used to chose where to move, shot, etc.
      +
      +
      Direction4Axis(int, int, boolean) - Constructor for enum class fr.lnl.game.server.games.action.Direction4Axis
      +
       
      +
      Direction8Axis - Enum Class in fr.lnl.game.server.games.action
      +
       
      +
      Direction8Axis(int, int) - Constructor for enum class fr.lnl.game.server.games.action.Direction8Axis
      +
       
      +
      doAction() - Method in interface fr.lnl.game.server.games.action.Action
      +
      +
      Call by Game when player do this action
      +
      +
      doAction() - Method in class fr.lnl.game.server.games.action.DeployShield
      +
      +
      Deploy player shield and decrement its energy
      +
      +
      doAction() - Method in class fr.lnl.game.server.games.action.DropBomb
      +
      +
      Drop a bomb in player's selected direction and decrement its energy
      +
      +
      doAction() - Method in class fr.lnl.game.server.games.action.DropMine
      +
      +
      Drop a mine in player's selected direction and decrement its energy
      +
      +
      doAction() - Method in class fr.lnl.game.server.games.action.Move
      +
      +
      Move player to its new position and decrement its point
      +
      +
      doAction() - Method in class fr.lnl.game.server.games.action.Nothing
      +
      +
      doAction in this context don't execute any operation
      +
      +
      doAction() - Method in class fr.lnl.game.server.games.action.Shot
      +
      +
      We decrement player's energy and shot on every of its opponents on the chosen direction by decrementing its + energy too
      +
      +
      DOWN - Enum constant in enum class fr.lnl.game.server.games.action.Direction4Axis
      +
       
      +
      DOWN - Enum constant in enum class fr.lnl.game.server.games.action.Direction8Axis
      +
       
      +
      DOWN_LEFT - Enum constant in enum class fr.lnl.game.server.games.action.Direction8Axis
      +
       
      +
      DOWN_RIGHT - Enum constant in enum class fr.lnl.game.server.games.action.Direction8Axis
      +
       
      +
      DPS - Enum constant in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      DropBomb - Class in fr.lnl.game.server.games.action
      +
      +
      Used when player want to drop a Bomb, bomb explode when someone walks on it and after 3 turns
      +
      +
      DropBomb(Game, Player, Direction8Axis) - Constructor for class fr.lnl.game.server.games.action.DropBomb
      +
       
      +
      DropMine - Class in fr.lnl.game.server.games.action
      +
      +
      Used when player want to drop a Mine, Mine only explode when someone walks on it
      +
      +
      DropMine(Game, Player, Direction8Axis) - Constructor for class fr.lnl.game.server.games.action.DropMine
      +
       
      +
      DropObject - Class in fr.lnl.game.server.games.action
      +
      +
      Super class used by DropMine and DropBomb
      +
      +
      DropObject(Game, Player, Direction8Axis) - Constructor for class fr.lnl.game.server.games.action.DropObject
      +
       
      +
      +

      E

      +
      +
      energy - Variable in class fr.lnl.game.server.games.player.AbstractPlayer
      +
       
      +
      energy - Variable in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      EnergyBall - Class in fr.lnl.game.server.games.grid.elements
      +
      +
      An EnergyBall is a box which give back a bit of player energy after it walks on the ball
      +
      +
      EnergyBall() - Constructor for class fr.lnl.game.server.games.grid.elements.EnergyBall
      +
       
      +
      energyProbability - Variable in class fr.lnl.game.server.games.grid.build.AbstractGridFactoryBuilder
      +
       
      +
      energyProbability(float) - Method in class fr.lnl.game.server.games.grid.build.AbstractGridFactoryBuilder
      +
       
      +
      energyProbability(float) - Method in interface fr.lnl.game.server.games.grid.build.GridFactoryBuilder
      +
      +
      Set energy probability
      +
      +
      Entry_Error_Message - Static variable in class fr.lnl.game.server.utils.ErrorMessage
      +
      +
      Error given to end-user when it give us a non integer or float value
      +
      +
      equals(Object) - Method in class fr.lnl.game.server.games.grid.elements.EnergyBall
      +
      +
      Used by tests
      +
      +
      equals(Object) - Method in class fr.lnl.game.server.games.grid.elements.Wall
      +
      +
      Used by tests
      +
      +
      equals(Object) - Method in class fr.lnl.game.server.utils.Pair
      +
       
      +
      ErrorMessage - Class in fr.lnl.game.server.utils
      +
      +
      Contain everything related to error messages, theirs errors are the fault of the end-user (like we demand an integer + and user give us a floating point number + Theirs error doesn't cause the program to stop, it'll demand a correct value
      +
      +
      ErrorMessage() - Constructor for class fr.lnl.game.server.utils.ErrorMessage
      +
       
      +
      explode(Grid) - Method in class fr.lnl.game.server.games.grid.elements.Bomb
      +
       
      +
      explode(Grid) - Method in class fr.lnl.game.server.games.grid.elements.Explosive
      +
      +
      Apply damage to players and delete this object
      +
      +
      explode(Grid) - Method in class fr.lnl.game.server.games.grid.elements.Mine
      +
       
      +
      EXPLOSION_SIZE - Static variable in class fr.lnl.game.server.games.grid.elements.Bomb
      +
      +
      Explosion size, size is circle, not square
      +
      +
      Explosive - Class in fr.lnl.game.server.games.grid.elements
      +
      +
      Super class of Bomb and Mine
      +
      +
      Explosive(Player, Point) - Constructor for class fr.lnl.game.server.games.grid.elements.Explosive
      +
       
      +
      extractReunionSameAction(List<ReunionSameAction>, Class) - Method in class fr.lnl.game.server.games.player.StrategyComputerPlayer
      +
       
      +
      +

      F

      +
      +
      Firearm - Class in fr.lnl.game.server.games.weapon
      +
       
      +
      Firearm() - Constructor for class fr.lnl.game.server.games.weapon.Firearm
      +
       
      +
      fireChange() - Method in class fr.lnl.game.server.listener.AbstractModelListening
      +
       
      +
      fr.lnl.game.server - package fr.lnl.game.server
      +
      +
      Server package
      +
      +
      fr.lnl.game.server.games - package fr.lnl.game.server.games
      +
      +
      Game package, contains all classes and sub-packages mainly related game works
      +
      +
      fr.lnl.game.server.games.action - package fr.lnl.game.server.games.action
      +
      +
      Package storing all actions a player can do
      +
      +
      fr.lnl.game.server.games.grid - package fr.lnl.game.server.games.grid
      +
      +
      Package containing all about Grid components
      +
      +
      fr.lnl.game.server.games.grid.build - package fr.lnl.game.server.games.grid.build
      +
      +
      Package containing all about Grid construction
      +
      +
      fr.lnl.game.server.games.grid.elements - package fr.lnl.game.server.games.grid.elements
      +
      +
      Package containing all the elements that can be arranged in a grid
      +
      +
      fr.lnl.game.server.games.player - package fr.lnl.game.server.games.player
      +
      +
      Package storing all players classes and as well AI behavior
      +
      +
      fr.lnl.game.server.games.weapon - package fr.lnl.game.server.games.weapon
      +
      +
      Package containing all bout player's weapons
      +
      +
      fr.lnl.game.server.listener - package fr.lnl.game.server.listener
      +
      +
      Package containing model of listener to implement + Used by listeners in client module
      +
      +
      fr.lnl.game.server.utils - package fr.lnl.game.server.utils
      +
      +
      Package containing all utility classes
      +
      +
      +

      G

      +
      +
      gainEnergy - Variable in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      game - Variable in class fr.lnl.game.server.games.action.AbstractAction
      +
       
      +
      game - Variable in class fr.lnl.game.server.games.grid.elements.Bomb
      +
       
      +
      Game - Class in fr.lnl.game.server.games
      +
       
      +
      Game(GridFactoryBuilder, List<Player>) - Constructor for class fr.lnl.game.server.games.Game
      +
       
      +
      generateAndGetPlayerActions(Player) - Method in class fr.lnl.game.server.games.Game
      +
      +
      Used to list all actions a player can execute at current time
      +
      +
      generateAvailableActions() - Method in class fr.lnl.game.server.games.player.AbstractPlayer
      +
       
      +
      generateAvailableActions() - Method in interface fr.lnl.game.server.games.player.Player
      +
       
      +
      getA() - Method in class fr.lnl.game.server.utils.Pair
      +
       
      +
      getAction(int) - Method in class fr.lnl.game.server.games.action.ReunionSameAction
      +
       
      +
      getActionName() - Method in class fr.lnl.game.server.games.action.ReunionSameAction
      +
       
      +
      getActions() - Method in class fr.lnl.game.server.games.action.ReunionSameAction
      +
       
      +
      getActions() - Method in class fr.lnl.game.server.games.player.AbstractPlayer
      +
       
      +
      getActions() - Method in interface fr.lnl.game.server.games.player.Player
      +
       
      +
      getAllCountdownElements() - Method in class fr.lnl.game.server.games.grid.Grid
      +
       
      +
      getB() - Method in class fr.lnl.game.server.utils.Pair
      +
       
      +
      getBoard() - Method in class fr.lnl.game.server.games.grid.Grid
      +
       
      +
      getBombCost() - Method in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      getBullet() - Method in class fr.lnl.game.server.games.weapon.Firearm
      +
       
      +
      getBullet() - Method in interface fr.lnl.game.server.games.weapon.Weapon
      +
       
      +
      getClassPlayer() - Method in class fr.lnl.game.server.games.player.AbstractPlayer
      +
       
      +
      getClassPlayer() - Method in interface fr.lnl.game.server.games.player.Player
      +
       
      +
      getColumn() - Method in class fr.lnl.game.server.games.grid.Grid
      +
       
      +
      getCurrentPlayer() - Method in class fr.lnl.game.server.games.Game
      +
       
      +
      getDeltaX() - Method in interface fr.lnl.game.server.games.action.Direction
      +
       
      +
      getDeltaX() - Method in enum class fr.lnl.game.server.games.action.Direction4Axis
      +
       
      +
      getDeltaX() - Method in enum class fr.lnl.game.server.games.action.Direction8Axis
      +
       
      +
      getDeltaY() - Method in interface fr.lnl.game.server.games.action.Direction
      +
       
      +
      getDeltaY() - Method in enum class fr.lnl.game.server.games.action.Direction4Axis
      +
       
      +
      getDeltaY() - Method in enum class fr.lnl.game.server.games.action.Direction8Axis
      +
       
      +
      getDirection() - Method in class fr.lnl.game.server.games.action.DropObject
      +
       
      +
      getDirection() - Method in class fr.lnl.game.server.games.action.Move
      +
       
      +
      getEnergy() - Method in class fr.lnl.game.server.games.player.AbstractPlayer
      +
       
      +
      getEnergy() - Method in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      getEnergy() - Method in interface fr.lnl.game.server.games.player.Player
      +
       
      +
      getGainEnergy() - Method in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      getGrid() - Method in class fr.lnl.game.server.games.Game
      +
       
      +
      getGrid() - Method in class fr.lnl.game.server.games.grid.build.AbstractGridFactoryBuilder
      +
       
      +
      getGridBox(Point) - Method in class fr.lnl.game.server.games.grid.Grid
      +
       
      +
      getGridPlayer(Point) - Method in class fr.lnl.game.server.games.grid.Grid
      +
       
      +
      getHorizontalDistance() - Method in class fr.lnl.game.server.games.weapon.Firearm
      +
       
      +
      getHorizontalDistance() - Method in interface fr.lnl.game.server.games.weapon.Weapon
      +
       
      +
      getId() - Method in class fr.lnl.game.server.games.player.AbstractPlayer
      +
       
      +
      getId() - Method in interface fr.lnl.game.server.games.player.Player
      +
       
      +
      getIllusionNumberWallNeighbour(Point) - Method in class fr.lnl.game.server.games.grid.build.LockGridFactoryBuilder
      +
      +
      A locked place is used to try to avoid player to be blocked when playing, + A locked place can't have a wall on it
      +
      +
      getMineCost() - Method in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      getMoveCost() - Method in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      getNbrTurn() - Method in class fr.lnl.game.server.games.Game
      +
       
      +
      getNumberNeutralBox() - Method in class fr.lnl.game.server.games.grid.Grid
      +
       
      +
      getPenaltyBomb() - Method in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      getPenaltyMine() - Method in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      getPenaltyShoot() - Method in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      getPlayer() - Method in class fr.lnl.game.server.games.grid.elements.Explosive
      +
       
      +
      getPlayers() - Method in class fr.lnl.game.server.games.Game
      +
       
      +
      getPlayers() - Method in class fr.lnl.game.server.games.grid.Grid
      +
       
      +
      getPlayersAlive() - Method in class fr.lnl.game.server.games.Game
      +
       
      +
      getPlayersNotAlive() - Method in class fr.lnl.game.server.games.Game
      +
      + +
      +
      getPoint() - Method in interface fr.lnl.game.server.games.action.Action
      +
      +
      Used by Move, Shot and DropObject to list all direction where the action is possible
      +
      +
      getPoint() - Method in class fr.lnl.game.server.games.action.DeployShield
      +
       
      +
      getPoint() - Method in class fr.lnl.game.server.games.action.DropObject
      +
       
      +
      getPoint() - Method in class fr.lnl.game.server.games.action.Move
      +
       
      +
      getPoint() - Method in class fr.lnl.game.server.games.action.Nothing
      +
       
      +
      getPoint() - Method in class fr.lnl.game.server.games.action.Shot
      +
       
      +
      getPosition() - Method in class fr.lnl.game.server.games.player.AbstractPlayer
      +
       
      +
      getPosition() - Method in interface fr.lnl.game.server.games.player.Player
      +
       
      +
      getPreviousPlayer() - Method in class fr.lnl.game.server.games.Game
      +
       
      +
      getRow() - Method in class fr.lnl.game.server.games.grid.Grid
      +
       
      +
      getSelectedAction() - Method in class fr.lnl.game.server.games.Game
      +
       
      +
      getShieldCost() - Method in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      getShootCost() - Method in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      getValidPoint() - Method in interface fr.lnl.game.server.games.action.Action
      +
       
      +
      getValidPoint() - Method in class fr.lnl.game.server.games.action.DeployShield
      +
       
      +
      getValidPoint() - Method in class fr.lnl.game.server.games.action.DropObject
      +
       
      +
      getValidPoint() - Method in class fr.lnl.game.server.games.action.Move
      +
       
      +
      getValidPoint() - Method in class fr.lnl.game.server.games.action.Nothing
      +
       
      +
      getValidPoint() - Method in class fr.lnl.game.server.games.action.Shot
      +
       
      +
      getVerticalDistance() - Method in class fr.lnl.game.server.games.weapon.Firearm
      +
       
      +
      getVerticalDistance() - Method in interface fr.lnl.game.server.games.weapon.Weapon
      +
       
      +
      getWeapon() - Method in class fr.lnl.game.server.games.player.AbstractPlayer
      +
       
      +
      getWeapon() - Method in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      getWeapon() - Method in interface fr.lnl.game.server.games.player.Player
      +
       
      +
      getWinner() - Method in class fr.lnl.game.server.games.Game
      +
       
      +
      grid - Variable in class fr.lnl.game.server.games.Game
      +
       
      +
      grid - Variable in class fr.lnl.game.server.games.grid.build.AbstractGridFactoryBuilder
      +
       
      +
      Grid - Class in fr.lnl.game.server.games.grid
      +
      +
      Class managing the board
      +
      +
      Grid(int, int, List<Player>) - Constructor for class fr.lnl.game.server.games.grid.Grid
      +
       
      +
      gridDimensions(int, int) - Method in class fr.lnl.game.server.games.grid.build.AbstractGridFactoryBuilder
      +
       
      +
      gridDimensions(int, int) - Method in interface fr.lnl.game.server.games.grid.build.GridFactoryBuilder
      +
      +
      set grid dimensions.
      +
      +
      GridFactoryBuilder - Interface in fr.lnl.game.server.games.grid.build
      +
      +
      Factory pattern
      +
      +
      gridPlayersUpdate() - Method in class fr.lnl.game.server.games.Game
      +
      +
      Remove dead players from the grid
      +
      +
      +

      H

      +
      +
      hashCode() - Method in class fr.lnl.game.server.utils.Pair
      +
      +
      Absolut useful when using HashMap or HashSet (or everything using hashCode to compare Objects
      +
      +
      horizontalDistance - Variable in class fr.lnl.game.server.games.weapon.Firearm
      +
       
      +
      HumanPlayer - Class in fr.lnl.game.server.games.player
      +
      +
      Instance of Human Player.
      + A human player choose an action to execute by using mouse or keyboard.
      + Human Player don't implement choseAction cause this method is executed on client part
      +
      +
      HumanPlayer(Integer, Point, ClassPlayer) - Constructor for class fr.lnl.game.server.games.player.HumanPlayer
      +
       
      +
      +

      I

      +
      +
      id - Variable in class fr.lnl.game.server.games.player.AbstractPlayer
      +
       
      +
      incrementEnergy(int) - Method in class fr.lnl.game.server.games.player.AbstractPlayer
      +
       
      +
      incrementEnergy(int) - Method in interface fr.lnl.game.server.games.player.Player
      +
      +
      Call by the implementing classes Action to add + a certain number of energy from a player
      +
      +
      initGame(GridFactoryBuilder) - Method in class fr.lnl.game.server.games.Game
      +
      +
      Initialize a game by placing players on the grid and by generating current player available actions
      +
      +
      initGrid() - Method in class fr.lnl.game.server.games.grid.build.AbstractGridFactoryBuilder
      +
      +
      abstract method used to initialize grid
      + We let implementation of this class the way to initialize the grid
      +
      +
      initGrid() - Method in class fr.lnl.game.server.games.grid.build.LockGridFactoryBuilder
      +
      +
      Method used to initialize grid
      + We place walls on every border, and we initialize board value as null where there is no need o border walls
      +
      +
      initPlaceEnergyBall() - Method in class fr.lnl.game.server.games.grid.build.AbstractGridFactoryBuilder
      +
      +
      abstract method used to place energy ball
      + We let implementation of this class the way to initialize the grid
      + Implementation need to use AbstractGridFactoryBuilder.energyProbability to place energy balls
      +
      +
      initPlaceEnergyBall() - Method in class fr.lnl.game.server.games.grid.build.LockGridFactoryBuilder
      +
      +
      Method used to initialize energy balls, we place energy balls using a random value and a probability and where + there is no walls
      +
      +
      initPlaceInternWall() - Method in class fr.lnl.game.server.games.grid.build.AbstractGridFactoryBuilder
      +
      +
      abstract method used to place intern walls(namely not border walls)
      + We let implementation of this class the way to initialize the grid.
      + Implementation need to use AbstractGridFactoryBuilder.wallProbability to place energy balls
      +
      +
      initPlaceInternWall() - Method in class fr.lnl.game.server.games.grid.build.LockGridFactoryBuilder
      +
      +
      Method used to place intern walls (opposite of border walls), we place walls using a random value and a + probability and where there is no walls or where the position haven't a lock
      +
      +
      initPlacePlayers() - Method in interface fr.lnl.game.server.games.grid.build.GridFactoryBuilder
      +
      +
      call when initializing the game, it'll place player depending on the strategy used by its implementation, + need to be call after build, call an NullPointerException otherwise
      +
      +
      initPlacePlayers() - Method in class fr.lnl.game.server.games.grid.build.LockGridFactoryBuilder
      +
      +
      Simply place player randomly where it's possible
      +
      +
      interact(Grid, Player, Point) - Method in class fr.lnl.game.server.games.grid.elements.EnergyBall
      +
      +
      Increment energy of player who walks on this element
      +
      +
      interact(Grid, Player, Point) - Method in class fr.lnl.game.server.games.grid.elements.Explosive
      +
      +
      Decrement energy of the player who walks on this element
      +
      +
      interact(Grid, Player, Point) - Method in interface fr.lnl.game.server.games.grid.elements.InteractiveBox
      +
      +
      Call when a player walk on it
      +
      +
      InteractiveBox - Interface in fr.lnl.game.server.games.grid.elements
      +
      +
      A box implemented by InteractiveBox is a box which do an action when someone walks on it
      +
      +
      isAlive() - Method in class fr.lnl.game.server.games.player.AbstractPlayer
      +
       
      +
      isAlive() - Method in interface fr.lnl.game.server.games.player.Player
      +
       
      +
      isFloat(String) - Static method in class fr.lnl.game.server.utils.Maths
      +
       
      +
      isInReunion(List<ReunionSameAction>, Class) - Method in class fr.lnl.game.server.games.player.StrategyComputerPlayer
      +
       
      +
      isInteger(String) - Static method in class fr.lnl.game.server.utils.Maths
      +
       
      +
      isLock() - Method in class fr.lnl.game.server.games.grid.elements.AbstractBox
      +
       
      +
      isLock() - Method in interface fr.lnl.game.server.games.grid.elements.Box
      +
       
      +
      isNeutralBox(Box) - Method in class fr.lnl.game.server.games.grid.Grid
      +
       
      +
      isOver() - Method in class fr.lnl.game.server.games.Game
      +
      +
      A game is over if the number of alive players is inferior to 2
      +
      +
      isPossible() - Method in interface fr.lnl.game.server.games.action.Action
      +
       
      +
      isPossible() - Method in class fr.lnl.game.server.games.action.DeployShield
      +
      +
      This action is always possible
      +
      +
      isPossible() - Method in class fr.lnl.game.server.games.action.DropObject
      +
       
      +
      isPossible() - Method in class fr.lnl.game.server.games.action.Move
      +
       
      +
      isPossible() - Method in class fr.lnl.game.server.games.action.Nothing
      +
      +
      This action is always possible
      +
      +
      isPossible() - Method in class fr.lnl.game.server.games.action.Shot
      +
       
      +
      isShieldDeploy() - Method in class fr.lnl.game.server.games.player.AbstractPlayer
      +
       
      +
      isShieldDeploy() - Method in interface fr.lnl.game.server.games.player.Player
      +
       
      +
      isVertical - Variable in enum class fr.lnl.game.server.games.action.Direction4Axis
      +
       
      +
      isVertical() - Method in enum class fr.lnl.game.server.games.action.Direction4Axis
      +
      +
      Used by Shot to know if the direction is in vertical direction cause shot action can have a different + distance depending on the direction
      +
      +
      +

      L

      +
      +
      LEFT - Enum constant in enum class fr.lnl.game.server.games.action.Direction4Axis
      +
       
      +
      LEFT - Enum constant in enum class fr.lnl.game.server.games.action.Direction8Axis
      +
       
      +
      listeners - Variable in class fr.lnl.game.server.listener.AbstractModelListening
      +
       
      +
      lock - Variable in class fr.lnl.game.server.games.grid.elements.AbstractBox
      +
       
      +
      LockGridFactoryBuilder - Class in fr.lnl.game.server.games.grid.build
      +
       
      +
      LockGridFactoryBuilder() - Constructor for class fr.lnl.game.server.games.grid.build.LockGridFactoryBuilder
      +
      +
      this method is protected to avoid new instance outside of GridFactoryBuilder context
      +
      +
      +

      M

      +
      +
      main(String[]) - Static method in class fr.lnl.game.server.ServerMain
      +
       
      +
      Maths - Class in fr.lnl.game.server.utils
      +
       
      +
      Maths() - Constructor for class fr.lnl.game.server.utils.Maths
      +
       
      +
      Mine - Class in fr.lnl.game.server.games.grid.elements
      +
      +
      A mine is an element which explose when someone walks on it, the explosion area is on 1 case only
      +
      +
      Mine(Player, Point) - Constructor for class fr.lnl.game.server.games.grid.elements.Mine
      +
       
      +
      mineCost - Variable in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      ModelListener - Interface in fr.lnl.game.server.listener
      +
      +
      Model implemented by AbstractModelListening
      +
      +
      Move - Class in fr.lnl.game.server.games.action
      +
      +
      Used when the player want to move in a direction, it can move in a direction when there is another player or a wall
      +
      +
      Move(Game, Player, Direction4Axis) - Constructor for class fr.lnl.game.server.games.action.Move
      +
       
      +
      moveCost - Variable in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      +

      N

      +
      +
      nbrTurn - Variable in class fr.lnl.game.server.games.Game
      +
       
      +
      nextCurrentPlayer() - Method in class fr.lnl.game.server.games.Game
      +
      +
      Change player to the next available in the list.
      + We set its shield deploy state to false.
      +
      +
      NoMoreBulletInWeaponException - Exception in fr.lnl.game.server.games.action
      +
      +
      This exception is throw when player has no remaining bullet
      +
      +
      NoMoreBulletInWeaponException() - Constructor for exception fr.lnl.game.server.games.action.NoMoreBulletInWeaponException
      +
       
      +
      Nothing - Class in fr.lnl.game.server.games.action
      +
      +
      This action is used when player doesn't want to move and/or loose energy
      +
      +
      Nothing() - Constructor for class fr.lnl.game.server.games.action.Nothing
      +
       
      +
      NotValidDirectionException - Exception in fr.lnl.game.server.games.action
      +
      +
      throw when action instantiated and the chosen direction in constructor isn't valid
      +
      +
      NotValidDirectionException(String) - Constructor for exception fr.lnl.game.server.games.action.NotValidDirectionException
      +
       
      +
      +

      P

      +
      +
      Pair<A,B> - Class in fr.lnl.game.server.utils
      +
      +
      Tuple associating storing two value of undefined type.
      + Unlike Python, value in this Tuple can be modified (but the type of its new value need to be the same)
      +
      +
      Pair(A, B) - Constructor for class fr.lnl.game.server.utils.Pair
      +
       
      +
      penaltyBomb - Variable in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      penaltyMine - Variable in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      penaltyShoot - Variable in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      play() - Method in class fr.lnl.game.server.games.Game
      +
      +
      Game "main" method, call by a controller after human chose an action or when a computer player play an action + Method is call everytime an action has been chosen by a human or when aa computer player need to play
      +
      +
      player - Variable in class fr.lnl.game.server.games.action.AbstractAction
      +
       
      +
      player - Variable in class fr.lnl.game.server.games.grid.elements.Explosive
      +
      +
      Owner of the explosive
      +
      +
      Player - Interface in fr.lnl.game.server.games.player
      +
       
      +
      players - Variable in class fr.lnl.game.server.games.Game
      +
       
      +
      players - Variable in class fr.lnl.game.server.games.grid.build.AbstractGridFactoryBuilder
      +
       
      +
      players - Variable in class fr.lnl.game.server.games.grid.Grid
      +
       
      +
      playersList(List<Player>) - Method in class fr.lnl.game.server.games.grid.build.AbstractGridFactoryBuilder
      +
       
      +
      playersList(List<Player>) - Method in interface fr.lnl.game.server.games.grid.build.GridFactoryBuilder
      +
      +
      set players list.
      +
      +
      point - Variable in class fr.lnl.game.server.games.action.DropObject
      +
       
      +
      point - Variable in class fr.lnl.game.server.games.action.Move
      +
       
      +
      point - Variable in class fr.lnl.game.server.games.action.Shot
      +
       
      +
      point - Variable in class fr.lnl.game.server.games.grid.elements.Explosive
      +
      +
      Position of the explosive
      +
      +
      Point - Class in fr.lnl.game.server.utils
      +
      +
      Point extends from Pair, basically a simpler ways to use Pair when using grid position
      +
      +
      Point(int, int) - Constructor for class fr.lnl.game.server.utils.Point
      +
       
      +
      position - Variable in class fr.lnl.game.server.games.player.AbstractPlayer
      +
       
      +
      previousPlayer - Variable in class fr.lnl.game.server.games.Game
      +
       
      +
      privateView(Player) - Method in class fr.lnl.game.server.games.grid.Grid
      +
       
      +
      pythagoras(double, double) - Method in class fr.lnl.game.server.games.grid.elements.Bomb
      +
       
      +
      +

      R

      +
      +
      RandomComputerPlayer - Class in fr.lnl.game.server.games.player
      +
       
      +
      RandomComputerPlayer(Integer, Point, ClassPlayer) - Constructor for class fr.lnl.game.server.games.player.RandomComputerPlayer
      +
       
      +
      removalListener(ModelListener) - Method in class fr.lnl.game.server.listener.AbstractModelListening
      +
       
      +
      ReunionSameAction - Class in fr.lnl.game.server.games.action
      +
      +
      When we generate action, we generate one per available direction (like in Move) but to improve human + readability, we list every same Action here
      +
      +
      ReunionSameAction(String) - Constructor for class fr.lnl.game.server.games.action.ReunionSameAction
      +
       
      +
      ReunionSameAction(String, Action) - Constructor for class fr.lnl.game.server.games.action.ReunionSameAction
      +
       
      +
      RIGHT - Enum constant in enum class fr.lnl.game.server.games.action.Direction4Axis
      +
       
      +
      RIGHT - Enum constant in enum class fr.lnl.game.server.games.action.Direction8Axis
      +
       
      +
      row - Variable in class fr.lnl.game.server.games.grid.build.AbstractGridFactoryBuilder
      +
       
      +
      row - Variable in class fr.lnl.game.server.games.grid.Grid
      +
       
      +
      +

      S

      +
      +
      seeNeighbour(Point, int, int, int) - Method in class fr.lnl.game.server.games.action.Shot
      +
       
      +
      selectedAction - Variable in class fr.lnl.game.server.games.Game
      +
       
      +
      server - module server
      +
      +
      Server module, include every model classes
      +
      +
      ServerMain - Class in fr.lnl.game.server
      +
       
      +
      ServerMain() - Constructor for class fr.lnl.game.server.ServerMain
      +
       
      +
      setA(A) - Method in class fr.lnl.game.server.utils.Pair
      +
       
      +
      setActions(List<Action>) - Method in class fr.lnl.game.server.games.player.AbstractPlayer
      +
       
      +
      setActions(List<Action>) - Method in interface fr.lnl.game.server.games.player.Player
      +
       
      +
      setB(B) - Method in class fr.lnl.game.server.utils.Pair
      +
       
      +
      setCurrentPlayer(Player) - Method in class fr.lnl.game.server.games.Game
      +
       
      +
      setEnergy(int) - Method in class fr.lnl.game.server.games.player.AbstractPlayer
      +
       
      +
      setEnergy(int) - Method in interface fr.lnl.game.server.games.player.Player
      +
       
      +
      setLock(boolean) - Method in class fr.lnl.game.server.games.grid.elements.AbstractBox
      +
       
      +
      setLock(boolean) - Method in interface fr.lnl.game.server.games.grid.elements.Box
      +
       
      +
      setPosition(Point) - Method in class fr.lnl.game.server.games.player.AbstractPlayer
      +
       
      +
      setPosition(Point) - Method in interface fr.lnl.game.server.games.player.Player
      +
       
      +
      setSelectedAction(Action) - Method in class fr.lnl.game.server.games.Game
      +
       
      +
      setShieldDeploy(boolean) - Method in class fr.lnl.game.server.games.player.AbstractPlayer
      +
       
      +
      setShieldDeploy(boolean) - Method in interface fr.lnl.game.server.games.player.Player
      +
       
      +
      setWeapon(Weapon) - Method in class fr.lnl.game.server.games.player.AbstractPlayer
      +
       
      +
      setWeapon(Weapon) - Method in interface fr.lnl.game.server.games.player.Player
      +
       
      +
      shieldCost - Variable in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      shieldDeploy - Variable in class fr.lnl.game.server.games.player.AbstractPlayer
      +
       
      +
      shootCost - Variable in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      Shot - Class in fr.lnl.game.server.games.action
      +
       
      +
      Shot(Game, Player) - Constructor for class fr.lnl.game.server.games.action.Shot
      +
       
      +
      Shot(Game, Player, Direction4Axis) - Constructor for class fr.lnl.game.server.games.action.Shot
      +
       
      +
      strategy(Game) - Method in class fr.lnl.game.server.games.player.ComputerPlayer
      +
      +
      Method belonging to classes which extend this class to define the specific strategy of the player
      +
      +
      strategy(Game) - Method in class fr.lnl.game.server.games.player.RandomComputerPlayer
      +
      +
      Choose an action fully randomly
      +
      +
      strategy(Game) - Method in class fr.lnl.game.server.games.player.StrategyComputerPlayer
      +
      +
      Choose an action following the strategy
      +
      +
      StrategyComputerPlayer - Class in fr.lnl.game.server.games.player
      +
       
      +
      StrategyComputerPlayer(Integer, Point, ClassPlayer) - Constructor for class fr.lnl.game.server.games.player.StrategyComputerPlayer
      +
       
      +
      SUPPORT - Enum constant in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      +

      T

      +
      +
      TANK - Enum constant in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      testFloat(String, Scanner, String) - Static method in class fr.lnl.game.server.utils.Maths
      +
      +
      Convert entry to a float
      +
      +
      testInteger(String, Scanner, String) - Static method in class fr.lnl.game.server.utils.Maths
      +
      +
      Convert entry to an integer
      +
      +
      toString() - Method in class fr.lnl.game.server.games.grid.Grid
      +
      +
      Given a string representation of the board.
      + Some characters in given string are in UTF-8 and can be poorly displayed if using an incompatible encoding, like + on Windows where french regional encoding is windows-1252
      +
      +
      toString() - Method in class fr.lnl.game.server.games.player.HumanPlayer
      +
       
      +
      toString() - Method in class fr.lnl.game.server.games.player.RandomComputerPlayer
      +
       
      +
      toString() - Method in class fr.lnl.game.server.games.player.StrategyComputerPlayer
      +
       
      +
      toString() - Method in class fr.lnl.game.server.utils.Pair
      +
       
      +
      +

      U

      +
      +
      UP - Enum constant in enum class fr.lnl.game.server.games.action.Direction4Axis
      +
       
      +
      UP - Enum constant in enum class fr.lnl.game.server.games.action.Direction8Axis
      +
       
      +
      UP_LEFT - Enum constant in enum class fr.lnl.game.server.games.action.Direction8Axis
      +
       
      +
      UP_RIGHT - Enum constant in enum class fr.lnl.game.server.games.action.Direction8Axis
      +
       
      +
      update() - Method in class fr.lnl.game.server.games.grid.elements.Bomb
      +
      +
      When the timer (counter) goes down to 0, the bomb explode
      +
      +
      update() - Method in interface fr.lnl.game.server.games.grid.elements.CountdownBox
      +
      +
      Call at each game tick (After a player do an action)
      +
      +
      updateModel(Object) - Method in interface fr.lnl.game.server.listener.ModelListener
      +
      +
      this method is call everytime, an action on the view forces a controller to sens an update to model
      +
      +
      +

      V

      +
      +
      valueOf(String) - Static method in enum class fr.lnl.game.server.games.action.Direction4Axis
      +
      +
      Returns the enum constant of this class with the specified name.
      +
      +
      valueOf(String) - Static method in enum class fr.lnl.game.server.games.action.Direction8Axis
      +
      +
      Returns the enum constant of this class with the specified name.
      +
      +
      valueOf(String) - Static method in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
      +
      Returns the enum constant of this class with the specified name.
      +
      +
      values() - Static method in enum class fr.lnl.game.server.games.action.Direction4Axis
      +
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      values() - Static method in enum class fr.lnl.game.server.games.action.Direction8Axis
      +
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      values() - Static method in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      verticalDistance - Variable in class fr.lnl.game.server.games.weapon.Firearm
      +
       
      +
      +

      W

      +
      +
      Wall - Class in fr.lnl.game.server.games.grid.elements
      +
      +
      A wall is an intraversable object
      +
      +
      Wall() - Constructor for class fr.lnl.game.server.games.grid.elements.Wall
      +
       
      +
      wallProbability - Variable in class fr.lnl.game.server.games.grid.build.AbstractGridFactoryBuilder
      +
       
      +
      wallProbability(float) - Method in class fr.lnl.game.server.games.grid.build.AbstractGridFactoryBuilder
      +
       
      +
      wallProbability(float) - Method in interface fr.lnl.game.server.games.grid.build.GridFactoryBuilder
      +
      +
      Set wall probability
      +
      +
      weapon - Variable in class fr.lnl.game.server.games.player.AbstractPlayer
      +
       
      +
      weapon - Variable in enum class fr.lnl.game.server.games.player.ClassPlayer
      +
       
      +
      Weapon - Interface in fr.lnl.game.server.games.weapon
      +
       
      +
      +A B C D E F G H I L M N P R S T U V W 
      All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
      +
      +
      + + diff --git a/livraison/doc/server/index.html b/livraison/doc/server/index.html new file mode 100644 index 0000000..44682ef --- /dev/null +++ b/livraison/doc/server/index.html @@ -0,0 +1,25 @@ + + + + +server API + + + + + + + + + + +
      + +

      server/module-summary.html

      +
      + + diff --git a/livraison/doc/server/jquery-ui.overrides.css b/livraison/doc/server/jquery-ui.overrides.css new file mode 100644 index 0000000..1abff95 --- /dev/null +++ b/livraison/doc/server/jquery-ui.overrides.css @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ + +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active, +a.ui-button:active, +.ui-button:active, +.ui-button.ui-state-active:hover { + /* Overrides the color of selection used in jQuery UI */ + background: #F8981D; +} diff --git a/livraison/doc/server/legal/COPYRIGHT b/livraison/doc/server/legal/COPYRIGHT new file mode 100644 index 0000000..ca74fff --- /dev/null +++ b/livraison/doc/server/legal/COPYRIGHT @@ -0,0 +1 @@ +Please see ..\java.base\COPYRIGHT diff --git a/livraison/doc/server/legal/LICENSE b/livraison/doc/server/legal/LICENSE new file mode 100644 index 0000000..4ad9fe4 --- /dev/null +++ b/livraison/doc/server/legal/LICENSE @@ -0,0 +1 @@ +Please see ..\java.base\LICENSE diff --git a/livraison/doc/server/legal/jquery.md b/livraison/doc/server/legal/jquery.md new file mode 100644 index 0000000..8054a34 --- /dev/null +++ b/livraison/doc/server/legal/jquery.md @@ -0,0 +1,72 @@ +## jQuery v3.5.1 + +### jQuery License +``` +jQuery v 3.5.1 +Copyright JS Foundation and other contributors, https://js.foundation/ + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +****************************************** + +The jQuery JavaScript Library v3.5.1 also includes Sizzle.js + +Sizzle.js includes the following license: + +Copyright JS Foundation and other contributors, https://js.foundation/ + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/jquery/sizzle + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +All files located in the node_modules and external directories are +externally maintained libraries used by this software which have their +own licenses; we recommend you read them, as their terms may differ from +the terms above. + +********************* + +``` diff --git a/livraison/doc/server/legal/jqueryUI.md b/livraison/doc/server/legal/jqueryUI.md new file mode 100644 index 0000000..8031bdb --- /dev/null +++ b/livraison/doc/server/legal/jqueryUI.md @@ -0,0 +1,49 @@ +## jQuery UI v1.12.1 + +### jQuery UI License +``` +Copyright jQuery Foundation and other contributors, https://jquery.org/ + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/jquery/jquery-ui + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code contained within the demos directory. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +All files located in the node_modules and external directories are +externally maintained libraries used by this software which have their +own licenses; we recommend you read them, as their terms may differ from +the terms above. + +``` diff --git a/livraison/doc/server/member-search-index.js b/livraison/doc/server/member-search-index.js new file mode 100644 index 0000000..473329d --- /dev/null +++ b/livraison/doc/server/member-search-index.js @@ -0,0 +1 @@ +memberSearchIndex = [{"p":"fr.lnl.game.server.utils","c":"Pair","l":"a"},{"p":"fr.lnl.game.server.games.action","c":"AbstractAction","l":"AbstractAction(Game, Player)","u":"%3Cinit%3E(fr.lnl.game.server.games.Game,fr.lnl.game.server.games.player.Player)"},{"p":"fr.lnl.game.server.games.grid.elements","c":"AbstractBox","l":"AbstractBox()","u":"%3Cinit%3E()"},{"p":"fr.lnl.game.server.games.grid.build","c":"AbstractGridFactoryBuilder","l":"AbstractGridFactoryBuilder()","u":"%3Cinit%3E()"},{"p":"fr.lnl.game.server.listener","c":"AbstractModelListening","l":"AbstractModelListening()","u":"%3Cinit%3E()"},{"p":"fr.lnl.game.server.games.player","c":"AbstractPlayer","l":"AbstractPlayer(Integer, Point, boolean, ClassPlayer)","u":"%3Cinit%3E(java.lang.Integer,fr.lnl.game.server.utils.Point,boolean,fr.lnl.game.server.games.player.ClassPlayer)"},{"p":"fr.lnl.game.server.games.action","c":"ReunionSameAction","l":"actionName"},{"p":"fr.lnl.game.server.games.action","c":"ReunionSameAction","l":"actions"},{"p":"fr.lnl.game.server.games.player","c":"AbstractPlayer","l":"actions"},{"p":"fr.lnl.game.server.games.action","c":"ReunionSameAction","l":"addAction(Action)","u":"addAction(fr.lnl.game.server.games.action.Action)"},{"p":"fr.lnl.game.server.listener","c":"AbstractModelListening","l":"addListener(ModelListener)","u":"addListener(fr.lnl.game.server.listener.ModelListener)"},{"p":"fr.lnl.game.server.utils","c":"Pair","l":"b"},{"p":"fr.lnl.game.server.games.grid","c":"Grid","l":"board"},{"p":"fr.lnl.game.server.games.grid","c":"Grid","l":"boardPositionIsValid(int, int)","u":"boardPositionIsValid(int,int)"},{"p":"fr.lnl.game.server.games.grid","c":"Grid","l":"boardPositionIsValid(int, int, int, int)","u":"boardPositionIsValid(int,int,int,int)"},{"p":"fr.lnl.game.server.games.grid","c":"Grid","l":"boardPositionIsValid(Point)","u":"boardPositionIsValid(fr.lnl.game.server.utils.Point)"},{"p":"fr.lnl.game.server.games.grid.elements","c":"Bomb","l":"Bomb(Point, Game)","u":"%3Cinit%3E(fr.lnl.game.server.utils.Point,fr.lnl.game.server.games.Game)"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"bombCost"},{"p":"fr.lnl.game.server.games.grid.build","c":"AbstractGridFactoryBuilder","l":"build()"},{"p":"fr.lnl.game.server.games.grid.build","c":"GridFactoryBuilder","l":"build()"},{"p":"fr.lnl.game.server.games.weapon","c":"Firearm","l":"bullet"},{"p":"fr.lnl.game.server.games.player","c":"ComputerPlayer","l":"choseAction(Game)","u":"choseAction(fr.lnl.game.server.games.Game)"},{"p":"fr.lnl.game.server.games.player","c":"StrategyComputerPlayer","l":"choseDeployShield(Game)","u":"choseDeployShield(fr.lnl.game.server.games.Game)"},{"p":"fr.lnl.game.server.games.player","c":"StrategyComputerPlayer","l":"choseExplosive(List)","u":"choseExplosive(java.util.List)"},{"p":"fr.lnl.game.server.games.player","c":"StrategyComputerPlayer","l":"choseMove(List, Game)","u":"choseMove(java.util.List,fr.lnl.game.server.games.Game)"},{"p":"fr.lnl.game.server.games.player","c":"StrategyComputerPlayer","l":"choseShot(List, Game)","u":"choseShot(java.util.List,fr.lnl.game.server.games.Game)"},{"p":"fr.lnl.game.server.games.player","c":"AbstractPlayer","l":"classPlayer"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"ClassPlayer(int, int, int, int, int, int, int, int, int, int, Weapon)","u":"%3Cinit%3E(int,int,int,int,int,int,int,int,int,int,fr.lnl.game.server.games.weapon.Weapon)"},{"p":"fr.lnl.game.server.games.grid","c":"Grid","l":"column"},{"p":"fr.lnl.game.server.games.grid.build","c":"AbstractGridFactoryBuilder","l":"columns"},{"p":"fr.lnl.game.server.games.player","c":"ComputerPlayer","l":"ComputerPlayer(Integer, Point, ClassPlayer)","u":"%3Cinit%3E(java.lang.Integer,fr.lnl.game.server.utils.Point,fr.lnl.game.server.games.player.ClassPlayer)"},{"p":"fr.lnl.game.server.games","c":"Game","l":"countdownGridElementsUpdate()"},{"p":"fr.lnl.game.server.games.grid.elements","c":"Bomb","l":"counter"},{"p":"fr.lnl.game.server.utils","c":"CrashException","l":"CrashException(String, Throwable)","u":"%3Cinit%3E(java.lang.String,java.lang.Throwable)"},{"p":"fr.lnl.game.server.games.grid.build","c":"LockGridFactoryBuilder","l":"create()"},{"p":"fr.lnl.game.server.games","c":"Game","l":"currentPlayer"},{"p":"fr.lnl.game.server.games.player","c":"AbstractPlayer","l":"decrementEnergy(int)"},{"p":"fr.lnl.game.server.games.player","c":"Player","l":"decrementEnergy(int)"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"DEFAULT"},{"p":"fr.lnl.game.server.games.action","c":"Direction4Axis","l":"deltaX"},{"p":"fr.lnl.game.server.games.action","c":"Direction8Axis","l":"deltaX"},{"p":"fr.lnl.game.server.games.action","c":"Direction4Axis","l":"deltaY"},{"p":"fr.lnl.game.server.games.action","c":"Direction8Axis","l":"deltaY"},{"p":"fr.lnl.game.server.games.action","c":"DeployShield","l":"DeployShield(Player)","u":"%3Cinit%3E(fr.lnl.game.server.games.player.Player)"},{"p":"fr.lnl.game.server.games.action","c":"DropObject","l":"direction"},{"p":"fr.lnl.game.server.games.action","c":"Move","l":"direction"},{"p":"fr.lnl.game.server.games.action","c":"Shot","l":"direction"},{"p":"fr.lnl.game.server.games.action","c":"Direction4Axis","l":"Direction4Axis(int, int, boolean)","u":"%3Cinit%3E(int,int,boolean)"},{"p":"fr.lnl.game.server.games.action","c":"Direction8Axis","l":"Direction8Axis(int, int)","u":"%3Cinit%3E(int,int)"},{"p":"fr.lnl.game.server.games.action","c":"Action","l":"doAction()"},{"p":"fr.lnl.game.server.games.action","c":"DeployShield","l":"doAction()"},{"p":"fr.lnl.game.server.games.action","c":"DropBomb","l":"doAction()"},{"p":"fr.lnl.game.server.games.action","c":"DropMine","l":"doAction()"},{"p":"fr.lnl.game.server.games.action","c":"Move","l":"doAction()"},{"p":"fr.lnl.game.server.games.action","c":"Nothing","l":"doAction()"},{"p":"fr.lnl.game.server.games.action","c":"Shot","l":"doAction()"},{"p":"fr.lnl.game.server.games.action","c":"Direction4Axis","l":"DOWN"},{"p":"fr.lnl.game.server.games.action","c":"Direction8Axis","l":"DOWN"},{"p":"fr.lnl.game.server.games.action","c":"Direction8Axis","l":"DOWN_LEFT"},{"p":"fr.lnl.game.server.games.action","c":"Direction8Axis","l":"DOWN_RIGHT"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"DPS"},{"p":"fr.lnl.game.server.games.action","c":"DropBomb","l":"DropBomb(Game, Player, Direction8Axis)","u":"%3Cinit%3E(fr.lnl.game.server.games.Game,fr.lnl.game.server.games.player.Player,fr.lnl.game.server.games.action.Direction8Axis)"},{"p":"fr.lnl.game.server.games.action","c":"DropMine","l":"DropMine(Game, Player, Direction8Axis)","u":"%3Cinit%3E(fr.lnl.game.server.games.Game,fr.lnl.game.server.games.player.Player,fr.lnl.game.server.games.action.Direction8Axis)"},{"p":"fr.lnl.game.server.games.action","c":"DropObject","l":"DropObject(Game, Player, Direction8Axis)","u":"%3Cinit%3E(fr.lnl.game.server.games.Game,fr.lnl.game.server.games.player.Player,fr.lnl.game.server.games.action.Direction8Axis)"},{"p":"fr.lnl.game.server.games.player","c":"AbstractPlayer","l":"energy"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"energy"},{"p":"fr.lnl.game.server.games.grid.elements","c":"EnergyBall","l":"EnergyBall()","u":"%3Cinit%3E()"},{"p":"fr.lnl.game.server.games.grid.build","c":"AbstractGridFactoryBuilder","l":"energyProbability"},{"p":"fr.lnl.game.server.games.grid.build","c":"AbstractGridFactoryBuilder","l":"energyProbability(float)"},{"p":"fr.lnl.game.server.games.grid.build","c":"GridFactoryBuilder","l":"energyProbability(float)"},{"p":"fr.lnl.game.server.utils","c":"ErrorMessage","l":"Entry_Error_Message"},{"p":"fr.lnl.game.server.games.grid.elements","c":"EnergyBall","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"fr.lnl.game.server.games.grid.elements","c":"Wall","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"fr.lnl.game.server.utils","c":"Pair","l":"equals(Object)","u":"equals(java.lang.Object)"},{"p":"fr.lnl.game.server.utils","c":"ErrorMessage","l":"ErrorMessage()","u":"%3Cinit%3E()"},{"p":"fr.lnl.game.server.games.grid.elements","c":"Bomb","l":"explode(Grid)","u":"explode(fr.lnl.game.server.games.grid.Grid)"},{"p":"fr.lnl.game.server.games.grid.elements","c":"Explosive","l":"explode(Grid)","u":"explode(fr.lnl.game.server.games.grid.Grid)"},{"p":"fr.lnl.game.server.games.grid.elements","c":"Mine","l":"explode(Grid)","u":"explode(fr.lnl.game.server.games.grid.Grid)"},{"p":"fr.lnl.game.server.games.grid.elements","c":"Bomb","l":"EXPLOSION_SIZE"},{"p":"fr.lnl.game.server.games.grid.elements","c":"Explosive","l":"Explosive(Player, Point)","u":"%3Cinit%3E(fr.lnl.game.server.games.player.Player,fr.lnl.game.server.utils.Point)"},{"p":"fr.lnl.game.server.games.player","c":"StrategyComputerPlayer","l":"extractReunionSameAction(List, Class)","u":"extractReunionSameAction(java.util.List,java.lang.Class)"},{"p":"fr.lnl.game.server.games.weapon","c":"Firearm","l":"Firearm()","u":"%3Cinit%3E()"},{"p":"fr.lnl.game.server.listener","c":"AbstractModelListening","l":"fireChange()"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"gainEnergy"},{"p":"fr.lnl.game.server.games.action","c":"AbstractAction","l":"game"},{"p":"fr.lnl.game.server.games.grid.elements","c":"Bomb","l":"game"},{"p":"fr.lnl.game.server.games","c":"Game","l":"Game(GridFactoryBuilder, List)","u":"%3Cinit%3E(fr.lnl.game.server.games.grid.build.GridFactoryBuilder,java.util.List)"},{"p":"fr.lnl.game.server.games","c":"Game","l":"generateAndGetPlayerActions(Player)","u":"generateAndGetPlayerActions(fr.lnl.game.server.games.player.Player)"},{"p":"fr.lnl.game.server.games.player","c":"AbstractPlayer","l":"generateAvailableActions()"},{"p":"fr.lnl.game.server.games.player","c":"Player","l":"generateAvailableActions()"},{"p":"fr.lnl.game.server.utils","c":"Pair","l":"getA()"},{"p":"fr.lnl.game.server.games.action","c":"ReunionSameAction","l":"getAction(int)"},{"p":"fr.lnl.game.server.games.action","c":"ReunionSameAction","l":"getActionName()"},{"p":"fr.lnl.game.server.games.action","c":"ReunionSameAction","l":"getActions()"},{"p":"fr.lnl.game.server.games.player","c":"AbstractPlayer","l":"getActions()"},{"p":"fr.lnl.game.server.games.player","c":"Player","l":"getActions()"},{"p":"fr.lnl.game.server.games.grid","c":"Grid","l":"getAllCountdownElements()"},{"p":"fr.lnl.game.server.utils","c":"Pair","l":"getB()"},{"p":"fr.lnl.game.server.games.grid","c":"Grid","l":"getBoard()"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"getBombCost()"},{"p":"fr.lnl.game.server.games.weapon","c":"Firearm","l":"getBullet()"},{"p":"fr.lnl.game.server.games.weapon","c":"Weapon","l":"getBullet()"},{"p":"fr.lnl.game.server.games.player","c":"AbstractPlayer","l":"getClassPlayer()"},{"p":"fr.lnl.game.server.games.player","c":"Player","l":"getClassPlayer()"},{"p":"fr.lnl.game.server.games.grid","c":"Grid","l":"getColumn()"},{"p":"fr.lnl.game.server.games","c":"Game","l":"getCurrentPlayer()"},{"p":"fr.lnl.game.server.games.action","c":"Direction","l":"getDeltaX()"},{"p":"fr.lnl.game.server.games.action","c":"Direction4Axis","l":"getDeltaX()"},{"p":"fr.lnl.game.server.games.action","c":"Direction8Axis","l":"getDeltaX()"},{"p":"fr.lnl.game.server.games.action","c":"Direction","l":"getDeltaY()"},{"p":"fr.lnl.game.server.games.action","c":"Direction4Axis","l":"getDeltaY()"},{"p":"fr.lnl.game.server.games.action","c":"Direction8Axis","l":"getDeltaY()"},{"p":"fr.lnl.game.server.games.action","c":"DropObject","l":"getDirection()"},{"p":"fr.lnl.game.server.games.action","c":"Move","l":"getDirection()"},{"p":"fr.lnl.game.server.games.player","c":"AbstractPlayer","l":"getEnergy()"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"getEnergy()"},{"p":"fr.lnl.game.server.games.player","c":"Player","l":"getEnergy()"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"getGainEnergy()"},{"p":"fr.lnl.game.server.games","c":"Game","l":"getGrid()"},{"p":"fr.lnl.game.server.games.grid.build","c":"AbstractGridFactoryBuilder","l":"getGrid()"},{"p":"fr.lnl.game.server.games.grid","c":"Grid","l":"getGridBox(Point)","u":"getGridBox(fr.lnl.game.server.utils.Point)"},{"p":"fr.lnl.game.server.games.grid","c":"Grid","l":"getGridPlayer(Point)","u":"getGridPlayer(fr.lnl.game.server.utils.Point)"},{"p":"fr.lnl.game.server.games.weapon","c":"Firearm","l":"getHorizontalDistance()"},{"p":"fr.lnl.game.server.games.weapon","c":"Weapon","l":"getHorizontalDistance()"},{"p":"fr.lnl.game.server.games.player","c":"AbstractPlayer","l":"getId()"},{"p":"fr.lnl.game.server.games.player","c":"Player","l":"getId()"},{"p":"fr.lnl.game.server.games.grid.build","c":"LockGridFactoryBuilder","l":"getIllusionNumberWallNeighbour(Point)","u":"getIllusionNumberWallNeighbour(fr.lnl.game.server.utils.Point)"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"getMineCost()"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"getMoveCost()"},{"p":"fr.lnl.game.server.games","c":"Game","l":"getNbrTurn()"},{"p":"fr.lnl.game.server.games.grid","c":"Grid","l":"getNumberNeutralBox()"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"getPenaltyBomb()"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"getPenaltyMine()"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"getPenaltyShoot()"},{"p":"fr.lnl.game.server.games.grid.elements","c":"Explosive","l":"getPlayer()"},{"p":"fr.lnl.game.server.games","c":"Game","l":"getPlayers()"},{"p":"fr.lnl.game.server.games.grid","c":"Grid","l":"getPlayers()"},{"p":"fr.lnl.game.server.games","c":"Game","l":"getPlayersAlive()"},{"p":"fr.lnl.game.server.games","c":"Game","l":"getPlayersNotAlive()"},{"p":"fr.lnl.game.server.games.action","c":"Action","l":"getPoint()"},{"p":"fr.lnl.game.server.games.action","c":"DeployShield","l":"getPoint()"},{"p":"fr.lnl.game.server.games.action","c":"DropObject","l":"getPoint()"},{"p":"fr.lnl.game.server.games.action","c":"Move","l":"getPoint()"},{"p":"fr.lnl.game.server.games.action","c":"Nothing","l":"getPoint()"},{"p":"fr.lnl.game.server.games.action","c":"Shot","l":"getPoint()"},{"p":"fr.lnl.game.server.games.player","c":"AbstractPlayer","l":"getPosition()"},{"p":"fr.lnl.game.server.games.player","c":"Player","l":"getPosition()"},{"p":"fr.lnl.game.server.games","c":"Game","l":"getPreviousPlayer()"},{"p":"fr.lnl.game.server.games.grid","c":"Grid","l":"getRow()"},{"p":"fr.lnl.game.server.games","c":"Game","l":"getSelectedAction()"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"getShieldCost()"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"getShootCost()"},{"p":"fr.lnl.game.server.games.action","c":"Action","l":"getValidPoint()"},{"p":"fr.lnl.game.server.games.action","c":"DeployShield","l":"getValidPoint()"},{"p":"fr.lnl.game.server.games.action","c":"DropObject","l":"getValidPoint()"},{"p":"fr.lnl.game.server.games.action","c":"Move","l":"getValidPoint()"},{"p":"fr.lnl.game.server.games.action","c":"Nothing","l":"getValidPoint()"},{"p":"fr.lnl.game.server.games.action","c":"Shot","l":"getValidPoint()"},{"p":"fr.lnl.game.server.games.weapon","c":"Firearm","l":"getVerticalDistance()"},{"p":"fr.lnl.game.server.games.weapon","c":"Weapon","l":"getVerticalDistance()"},{"p":"fr.lnl.game.server.games.player","c":"AbstractPlayer","l":"getWeapon()"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"getWeapon()"},{"p":"fr.lnl.game.server.games.player","c":"Player","l":"getWeapon()"},{"p":"fr.lnl.game.server.games","c":"Game","l":"getWinner()"},{"p":"fr.lnl.game.server.games","c":"Game","l":"grid"},{"p":"fr.lnl.game.server.games.grid.build","c":"AbstractGridFactoryBuilder","l":"grid"},{"p":"fr.lnl.game.server.games.grid","c":"Grid","l":"Grid(int, int, List)","u":"%3Cinit%3E(int,int,java.util.List)"},{"p":"fr.lnl.game.server.games.grid.build","c":"AbstractGridFactoryBuilder","l":"gridDimensions(int, int)","u":"gridDimensions(int,int)"},{"p":"fr.lnl.game.server.games.grid.build","c":"GridFactoryBuilder","l":"gridDimensions(int, int)","u":"gridDimensions(int,int)"},{"p":"fr.lnl.game.server.games","c":"Game","l":"gridPlayersUpdate()"},{"p":"fr.lnl.game.server.utils","c":"Pair","l":"hashCode()"},{"p":"fr.lnl.game.server.games.weapon","c":"Firearm","l":"horizontalDistance"},{"p":"fr.lnl.game.server.games.player","c":"HumanPlayer","l":"HumanPlayer(Integer, Point, ClassPlayer)","u":"%3Cinit%3E(java.lang.Integer,fr.lnl.game.server.utils.Point,fr.lnl.game.server.games.player.ClassPlayer)"},{"p":"fr.lnl.game.server.games.player","c":"AbstractPlayer","l":"id"},{"p":"fr.lnl.game.server.games.player","c":"AbstractPlayer","l":"incrementEnergy(int)"},{"p":"fr.lnl.game.server.games.player","c":"Player","l":"incrementEnergy(int)"},{"p":"fr.lnl.game.server.games","c":"Game","l":"initGame(GridFactoryBuilder)","u":"initGame(fr.lnl.game.server.games.grid.build.GridFactoryBuilder)"},{"p":"fr.lnl.game.server.games.grid.build","c":"AbstractGridFactoryBuilder","l":"initGrid()"},{"p":"fr.lnl.game.server.games.grid.build","c":"LockGridFactoryBuilder","l":"initGrid()"},{"p":"fr.lnl.game.server.games.grid.build","c":"AbstractGridFactoryBuilder","l":"initPlaceEnergyBall()"},{"p":"fr.lnl.game.server.games.grid.build","c":"LockGridFactoryBuilder","l":"initPlaceEnergyBall()"},{"p":"fr.lnl.game.server.games.grid.build","c":"AbstractGridFactoryBuilder","l":"initPlaceInternWall()"},{"p":"fr.lnl.game.server.games.grid.build","c":"LockGridFactoryBuilder","l":"initPlaceInternWall()"},{"p":"fr.lnl.game.server.games.grid.build","c":"GridFactoryBuilder","l":"initPlacePlayers()"},{"p":"fr.lnl.game.server.games.grid.build","c":"LockGridFactoryBuilder","l":"initPlacePlayers()"},{"p":"fr.lnl.game.server.games.grid.elements","c":"EnergyBall","l":"interact(Grid, Player, Point)","u":"interact(fr.lnl.game.server.games.grid.Grid,fr.lnl.game.server.games.player.Player,fr.lnl.game.server.utils.Point)"},{"p":"fr.lnl.game.server.games.grid.elements","c":"Explosive","l":"interact(Grid, Player, Point)","u":"interact(fr.lnl.game.server.games.grid.Grid,fr.lnl.game.server.games.player.Player,fr.lnl.game.server.utils.Point)"},{"p":"fr.lnl.game.server.games.grid.elements","c":"InteractiveBox","l":"interact(Grid, Player, Point)","u":"interact(fr.lnl.game.server.games.grid.Grid,fr.lnl.game.server.games.player.Player,fr.lnl.game.server.utils.Point)"},{"p":"fr.lnl.game.server.games.player","c":"AbstractPlayer","l":"isAlive()"},{"p":"fr.lnl.game.server.games.player","c":"Player","l":"isAlive()"},{"p":"fr.lnl.game.server.utils","c":"Maths","l":"isFloat(String)","u":"isFloat(java.lang.String)"},{"p":"fr.lnl.game.server.games.player","c":"StrategyComputerPlayer","l":"isInReunion(List, Class)","u":"isInReunion(java.util.List,java.lang.Class)"},{"p":"fr.lnl.game.server.utils","c":"Maths","l":"isInteger(String)","u":"isInteger(java.lang.String)"},{"p":"fr.lnl.game.server.games.grid.elements","c":"AbstractBox","l":"isLock()"},{"p":"fr.lnl.game.server.games.grid.elements","c":"Box","l":"isLock()"},{"p":"fr.lnl.game.server.games.grid","c":"Grid","l":"isNeutralBox(Box)","u":"isNeutralBox(fr.lnl.game.server.games.grid.elements.Box)"},{"p":"fr.lnl.game.server.games","c":"Game","l":"isOver()"},{"p":"fr.lnl.game.server.games.action","c":"Action","l":"isPossible()"},{"p":"fr.lnl.game.server.games.action","c":"DeployShield","l":"isPossible()"},{"p":"fr.lnl.game.server.games.action","c":"DropObject","l":"isPossible()"},{"p":"fr.lnl.game.server.games.action","c":"Move","l":"isPossible()"},{"p":"fr.lnl.game.server.games.action","c":"Nothing","l":"isPossible()"},{"p":"fr.lnl.game.server.games.action","c":"Shot","l":"isPossible()"},{"p":"fr.lnl.game.server.games.player","c":"AbstractPlayer","l":"isShieldDeploy()"},{"p":"fr.lnl.game.server.games.player","c":"Player","l":"isShieldDeploy()"},{"p":"fr.lnl.game.server.games.action","c":"Direction4Axis","l":"isVertical"},{"p":"fr.lnl.game.server.games.action","c":"Direction4Axis","l":"isVertical()"},{"p":"fr.lnl.game.server.games.action","c":"Direction4Axis","l":"LEFT"},{"p":"fr.lnl.game.server.games.action","c":"Direction8Axis","l":"LEFT"},{"p":"fr.lnl.game.server.listener","c":"AbstractModelListening","l":"listeners"},{"p":"fr.lnl.game.server.games.grid.elements","c":"AbstractBox","l":"lock"},{"p":"fr.lnl.game.server.games.grid.build","c":"LockGridFactoryBuilder","l":"LockGridFactoryBuilder()","u":"%3Cinit%3E()"},{"p":"fr.lnl.game.server","c":"ServerMain","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"fr.lnl.game.server.utils","c":"Maths","l":"Maths()","u":"%3Cinit%3E()"},{"p":"fr.lnl.game.server.games.grid.elements","c":"Mine","l":"Mine(Player, Point)","u":"%3Cinit%3E(fr.lnl.game.server.games.player.Player,fr.lnl.game.server.utils.Point)"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"mineCost"},{"p":"fr.lnl.game.server.games.action","c":"Move","l":"Move(Game, Player, Direction4Axis)","u":"%3Cinit%3E(fr.lnl.game.server.games.Game,fr.lnl.game.server.games.player.Player,fr.lnl.game.server.games.action.Direction4Axis)"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"moveCost"},{"p":"fr.lnl.game.server.games","c":"Game","l":"nbrTurn"},{"p":"fr.lnl.game.server.games","c":"Game","l":"nextCurrentPlayer()"},{"p":"fr.lnl.game.server.games.action","c":"NoMoreBulletInWeaponException","l":"NoMoreBulletInWeaponException()","u":"%3Cinit%3E()"},{"p":"fr.lnl.game.server.games.action","c":"Nothing","l":"Nothing()","u":"%3Cinit%3E()"},{"p":"fr.lnl.game.server.games.action","c":"NotValidDirectionException","l":"NotValidDirectionException(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"fr.lnl.game.server.utils","c":"Pair","l":"Pair(A, B)","u":"%3Cinit%3E(A,B)"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"penaltyBomb"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"penaltyMine"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"penaltyShoot"},{"p":"fr.lnl.game.server.games","c":"Game","l":"play()"},{"p":"fr.lnl.game.server.games.action","c":"AbstractAction","l":"player"},{"p":"fr.lnl.game.server.games.grid.elements","c":"Explosive","l":"player"},{"p":"fr.lnl.game.server.games","c":"Game","l":"players"},{"p":"fr.lnl.game.server.games.grid.build","c":"AbstractGridFactoryBuilder","l":"players"},{"p":"fr.lnl.game.server.games.grid","c":"Grid","l":"players"},{"p":"fr.lnl.game.server.games.grid.build","c":"AbstractGridFactoryBuilder","l":"playersList(List)","u":"playersList(java.util.List)"},{"p":"fr.lnl.game.server.games.grid.build","c":"GridFactoryBuilder","l":"playersList(List)","u":"playersList(java.util.List)"},{"p":"fr.lnl.game.server.games.action","c":"DropObject","l":"point"},{"p":"fr.lnl.game.server.games.action","c":"Move","l":"point"},{"p":"fr.lnl.game.server.games.action","c":"Shot","l":"point"},{"p":"fr.lnl.game.server.games.grid.elements","c":"Explosive","l":"point"},{"p":"fr.lnl.game.server.utils","c":"Point","l":"Point(int, int)","u":"%3Cinit%3E(int,int)"},{"p":"fr.lnl.game.server.games.player","c":"AbstractPlayer","l":"position"},{"p":"fr.lnl.game.server.games","c":"Game","l":"previousPlayer"},{"p":"fr.lnl.game.server.games.grid","c":"Grid","l":"privateView(Player)","u":"privateView(fr.lnl.game.server.games.player.Player)"},{"p":"fr.lnl.game.server.games.grid.elements","c":"Bomb","l":"pythagoras(double, double)","u":"pythagoras(double,double)"},{"p":"fr.lnl.game.server.games.player","c":"RandomComputerPlayer","l":"RandomComputerPlayer(Integer, Point, ClassPlayer)","u":"%3Cinit%3E(java.lang.Integer,fr.lnl.game.server.utils.Point,fr.lnl.game.server.games.player.ClassPlayer)"},{"p":"fr.lnl.game.server.listener","c":"AbstractModelListening","l":"removalListener(ModelListener)","u":"removalListener(fr.lnl.game.server.listener.ModelListener)"},{"p":"fr.lnl.game.server.games.action","c":"ReunionSameAction","l":"ReunionSameAction(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"fr.lnl.game.server.games.action","c":"ReunionSameAction","l":"ReunionSameAction(String, Action)","u":"%3Cinit%3E(java.lang.String,fr.lnl.game.server.games.action.Action)"},{"p":"fr.lnl.game.server.games.action","c":"Direction4Axis","l":"RIGHT"},{"p":"fr.lnl.game.server.games.action","c":"Direction8Axis","l":"RIGHT"},{"p":"fr.lnl.game.server.games.grid.build","c":"AbstractGridFactoryBuilder","l":"row"},{"p":"fr.lnl.game.server.games.grid","c":"Grid","l":"row"},{"p":"fr.lnl.game.server.games.action","c":"Shot","l":"seeNeighbour(Point, int, int, int)","u":"seeNeighbour(fr.lnl.game.server.utils.Point,int,int,int)"},{"p":"fr.lnl.game.server.games","c":"Game","l":"selectedAction"},{"p":"fr.lnl.game.server","c":"ServerMain","l":"ServerMain()","u":"%3Cinit%3E()"},{"p":"fr.lnl.game.server.utils","c":"Pair","l":"setA(A)"},{"p":"fr.lnl.game.server.games.player","c":"AbstractPlayer","l":"setActions(List)","u":"setActions(java.util.List)"},{"p":"fr.lnl.game.server.games.player","c":"Player","l":"setActions(List)","u":"setActions(java.util.List)"},{"p":"fr.lnl.game.server.utils","c":"Pair","l":"setB(B)"},{"p":"fr.lnl.game.server.games","c":"Game","l":"setCurrentPlayer(Player)","u":"setCurrentPlayer(fr.lnl.game.server.games.player.Player)"},{"p":"fr.lnl.game.server.games.player","c":"AbstractPlayer","l":"setEnergy(int)"},{"p":"fr.lnl.game.server.games.player","c":"Player","l":"setEnergy(int)"},{"p":"fr.lnl.game.server.games.grid.elements","c":"AbstractBox","l":"setLock(boolean)"},{"p":"fr.lnl.game.server.games.grid.elements","c":"Box","l":"setLock(boolean)"},{"p":"fr.lnl.game.server.games.player","c":"AbstractPlayer","l":"setPosition(Point)","u":"setPosition(fr.lnl.game.server.utils.Point)"},{"p":"fr.lnl.game.server.games.player","c":"Player","l":"setPosition(Point)","u":"setPosition(fr.lnl.game.server.utils.Point)"},{"p":"fr.lnl.game.server.games","c":"Game","l":"setSelectedAction(Action)","u":"setSelectedAction(fr.lnl.game.server.games.action.Action)"},{"p":"fr.lnl.game.server.games.player","c":"AbstractPlayer","l":"setShieldDeploy(boolean)"},{"p":"fr.lnl.game.server.games.player","c":"Player","l":"setShieldDeploy(boolean)"},{"p":"fr.lnl.game.server.games.player","c":"AbstractPlayer","l":"setWeapon(Weapon)","u":"setWeapon(fr.lnl.game.server.games.weapon.Weapon)"},{"p":"fr.lnl.game.server.games.player","c":"Player","l":"setWeapon(Weapon)","u":"setWeapon(fr.lnl.game.server.games.weapon.Weapon)"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"shieldCost"},{"p":"fr.lnl.game.server.games.player","c":"AbstractPlayer","l":"shieldDeploy"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"shootCost"},{"p":"fr.lnl.game.server.games.action","c":"Shot","l":"Shot(Game, Player)","u":"%3Cinit%3E(fr.lnl.game.server.games.Game,fr.lnl.game.server.games.player.Player)"},{"p":"fr.lnl.game.server.games.action","c":"Shot","l":"Shot(Game, Player, Direction4Axis)","u":"%3Cinit%3E(fr.lnl.game.server.games.Game,fr.lnl.game.server.games.player.Player,fr.lnl.game.server.games.action.Direction4Axis)"},{"p":"fr.lnl.game.server.games.player","c":"ComputerPlayer","l":"strategy(Game)","u":"strategy(fr.lnl.game.server.games.Game)"},{"p":"fr.lnl.game.server.games.player","c":"RandomComputerPlayer","l":"strategy(Game)","u":"strategy(fr.lnl.game.server.games.Game)"},{"p":"fr.lnl.game.server.games.player","c":"StrategyComputerPlayer","l":"strategy(Game)","u":"strategy(fr.lnl.game.server.games.Game)"},{"p":"fr.lnl.game.server.games.player","c":"StrategyComputerPlayer","l":"StrategyComputerPlayer(Integer, Point, ClassPlayer)","u":"%3Cinit%3E(java.lang.Integer,fr.lnl.game.server.utils.Point,fr.lnl.game.server.games.player.ClassPlayer)"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"SUPPORT"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"TANK"},{"p":"fr.lnl.game.server.utils","c":"Maths","l":"testFloat(String, Scanner, String)","u":"testFloat(java.lang.String,java.util.Scanner,java.lang.String)"},{"p":"fr.lnl.game.server.utils","c":"Maths","l":"testInteger(String, Scanner, String)","u":"testInteger(java.lang.String,java.util.Scanner,java.lang.String)"},{"p":"fr.lnl.game.server.games.grid","c":"Grid","l":"toString()"},{"p":"fr.lnl.game.server.games.player","c":"HumanPlayer","l":"toString()"},{"p":"fr.lnl.game.server.games.player","c":"RandomComputerPlayer","l":"toString()"},{"p":"fr.lnl.game.server.games.player","c":"StrategyComputerPlayer","l":"toString()"},{"p":"fr.lnl.game.server.utils","c":"Pair","l":"toString()"},{"p":"fr.lnl.game.server.games.action","c":"Direction4Axis","l":"UP"},{"p":"fr.lnl.game.server.games.action","c":"Direction8Axis","l":"UP"},{"p":"fr.lnl.game.server.games.action","c":"Direction8Axis","l":"UP_LEFT"},{"p":"fr.lnl.game.server.games.action","c":"Direction8Axis","l":"UP_RIGHT"},{"p":"fr.lnl.game.server.games.grid.elements","c":"Bomb","l":"update()"},{"p":"fr.lnl.game.server.games.grid.elements","c":"CountdownBox","l":"update()"},{"p":"fr.lnl.game.server.listener","c":"ModelListener","l":"updateModel(Object)","u":"updateModel(java.lang.Object)"},{"p":"fr.lnl.game.server.games.action","c":"Direction4Axis","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"fr.lnl.game.server.games.action","c":"Direction8Axis","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"fr.lnl.game.server.games.action","c":"Direction4Axis","l":"values()"},{"p":"fr.lnl.game.server.games.action","c":"Direction8Axis","l":"values()"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"values()"},{"p":"fr.lnl.game.server.games.weapon","c":"Firearm","l":"verticalDistance"},{"p":"fr.lnl.game.server.games.grid.elements","c":"Wall","l":"Wall()","u":"%3Cinit%3E()"},{"p":"fr.lnl.game.server.games.grid.build","c":"AbstractGridFactoryBuilder","l":"wallProbability"},{"p":"fr.lnl.game.server.games.grid.build","c":"AbstractGridFactoryBuilder","l":"wallProbability(float)"},{"p":"fr.lnl.game.server.games.grid.build","c":"GridFactoryBuilder","l":"wallProbability(float)"},{"p":"fr.lnl.game.server.games.player","c":"AbstractPlayer","l":"weapon"},{"p":"fr.lnl.game.server.games.player","c":"ClassPlayer","l":"weapon"}];updateSearchResults(); \ No newline at end of file diff --git a/livraison/doc/server/module-search-index.js b/livraison/doc/server/module-search-index.js new file mode 100644 index 0000000..3b67c2a --- /dev/null +++ b/livraison/doc/server/module-search-index.js @@ -0,0 +1 @@ +moduleSearchIndex = [{"l":"server"}];updateSearchResults(); \ No newline at end of file diff --git a/livraison/doc/server/overview-tree.html b/livraison/doc/server/overview-tree.html new file mode 100644 index 0000000..5e16b11 --- /dev/null +++ b/livraison/doc/server/overview-tree.html @@ -0,0 +1,178 @@ + + + + +Class Hierarchy (server API) + + + + + + + + + + + + + + +
      + +
      +
      + +
      +

      Class Hierarchy

      + +
      +
      +

      Interface Hierarchy

      + +
      +
      +

      Enum Class Hierarchy

      + +
      +
      +
      +
      + + diff --git a/livraison/doc/server/package-search-index.js b/livraison/doc/server/package-search-index.js new file mode 100644 index 0000000..447b3ab --- /dev/null +++ b/livraison/doc/server/package-search-index.js @@ -0,0 +1 @@ +packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"m":"server","l":"fr.lnl.game.server"},{"m":"server","l":"fr.lnl.game.server.games"},{"m":"server","l":"fr.lnl.game.server.games.action"},{"m":"server","l":"fr.lnl.game.server.games.grid"},{"m":"server","l":"fr.lnl.game.server.games.grid.build"},{"m":"server","l":"fr.lnl.game.server.games.grid.elements"},{"m":"server","l":"fr.lnl.game.server.games.player"},{"m":"server","l":"fr.lnl.game.server.games.weapon"},{"m":"server","l":"fr.lnl.game.server.listener"},{"m":"server","l":"fr.lnl.game.server.utils"}];updateSearchResults(); \ No newline at end of file diff --git a/livraison/doc/server/resources/glass.png b/livraison/doc/server/resources/glass.png new file mode 100644 index 0000000..a7f591f Binary files /dev/null and b/livraison/doc/server/resources/glass.png differ diff --git a/livraison/doc/server/resources/x.png b/livraison/doc/server/resources/x.png new file mode 100644 index 0000000..30548a7 Binary files /dev/null and b/livraison/doc/server/resources/x.png differ diff --git a/livraison/doc/server/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png b/livraison/doc/server/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png new file mode 100644 index 0000000..34abd18 Binary files /dev/null and b/livraison/doc/server/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png differ diff --git a/livraison/doc/server/script-dir/images/ui-bg_glass_65_dadada_1x400.png b/livraison/doc/server/script-dir/images/ui-bg_glass_65_dadada_1x400.png new file mode 100644 index 0000000..f058a93 Binary files /dev/null and b/livraison/doc/server/script-dir/images/ui-bg_glass_65_dadada_1x400.png differ diff --git a/livraison/doc/server/script-dir/images/ui-bg_glass_75_dadada_1x400.png b/livraison/doc/server/script-dir/images/ui-bg_glass_75_dadada_1x400.png new file mode 100644 index 0000000..2ce04c1 Binary files /dev/null and b/livraison/doc/server/script-dir/images/ui-bg_glass_75_dadada_1x400.png differ diff --git a/livraison/doc/server/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png b/livraison/doc/server/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png new file mode 100644 index 0000000..a90afb8 Binary files /dev/null and b/livraison/doc/server/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png differ diff --git a/livraison/doc/server/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png b/livraison/doc/server/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png new file mode 100644 index 0000000..dbe091f Binary files /dev/null and b/livraison/doc/server/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png differ diff --git a/livraison/doc/server/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/livraison/doc/server/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png new file mode 100644 index 0000000..5dc3593 Binary files /dev/null and b/livraison/doc/server/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ diff --git a/livraison/doc/server/script-dir/images/ui-icons_222222_256x240.png b/livraison/doc/server/script-dir/images/ui-icons_222222_256x240.png new file mode 100644 index 0000000..e723e17 Binary files /dev/null and b/livraison/doc/server/script-dir/images/ui-icons_222222_256x240.png differ diff --git a/livraison/doc/server/script-dir/images/ui-icons_2e83ff_256x240.png b/livraison/doc/server/script-dir/images/ui-icons_2e83ff_256x240.png new file mode 100644 index 0000000..1f5f497 Binary files /dev/null and b/livraison/doc/server/script-dir/images/ui-icons_2e83ff_256x240.png differ diff --git a/livraison/doc/server/script-dir/images/ui-icons_454545_256x240.png b/livraison/doc/server/script-dir/images/ui-icons_454545_256x240.png new file mode 100644 index 0000000..618f5b0 Binary files /dev/null and b/livraison/doc/server/script-dir/images/ui-icons_454545_256x240.png differ diff --git a/livraison/doc/server/script-dir/images/ui-icons_888888_256x240.png b/livraison/doc/server/script-dir/images/ui-icons_888888_256x240.png new file mode 100644 index 0000000..ee5e33f Binary files /dev/null and b/livraison/doc/server/script-dir/images/ui-icons_888888_256x240.png differ diff --git a/livraison/doc/server/script-dir/images/ui-icons_cd0a0a_256x240.png b/livraison/doc/server/script-dir/images/ui-icons_cd0a0a_256x240.png new file mode 100644 index 0000000..7e8ebc1 Binary files /dev/null and b/livraison/doc/server/script-dir/images/ui-icons_cd0a0a_256x240.png differ diff --git a/livraison/doc/server/script-dir/jquery-3.5.1.min.js b/livraison/doc/server/script-dir/jquery-3.5.1.min.js new file mode 100644 index 0000000..b061403 --- /dev/null +++ b/livraison/doc/server/script-dir/jquery-3.5.1.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
      "],col:[2,"","
      "],tr:[2,"","
      "],td:[3,"","
      "],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
      ",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0a;a++)for(s in o[a])n=o[a][s],o[a].hasOwnProperty(s)&&void 0!==n&&(e[s]=t.isPlainObject(n)?t.isPlainObject(e[s])?t.widget.extend({},e[s],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,s){var n=s.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=i.call(arguments,1),l=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(l=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(l=i&&i.jquery?l.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):l=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new s(o,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
      ",options:{classes:{},disabled:!1,create:null},_createWidget:function(i,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),i),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var l=s.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,c=l[2];c?n.on(h,c,r):i.on(h,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,l=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("
      "),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};h>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),l.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-a-n;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+a-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-a-n;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+a-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-r-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,(i>0||u>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.menu",{version:"1.12.1",defaultElement:"
        ",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,l=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=l.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("").data("ui-menu-submenu-caret",!0);a._addClass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=l.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasScroll:function(){return this.element.outerHeight()",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,void 0;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),void 0):(this._searchTimeout(t),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("
          ").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("
          ").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("
          ",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length").append(t("
          ").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("
          ").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete}); \ No newline at end of file diff --git a/livraison/doc/server/script-dir/jquery-ui.structure.min.css b/livraison/doc/server/script-dir/jquery-ui.structure.min.css new file mode 100644 index 0000000..e880892 --- /dev/null +++ b/livraison/doc/server/script-dir/jquery-ui.structure.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.12.1 - 2018-12-06 +* http://jqueryui.com +* Copyright jQuery Foundation and other contributors; Licensed MIT */ + +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0} \ No newline at end of file diff --git a/livraison/doc/server/script.js b/livraison/doc/server/script.js new file mode 100644 index 0000000..0765364 --- /dev/null +++ b/livraison/doc/server/script.js @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ + +var moduleSearchIndex; +var packageSearchIndex; +var typeSearchIndex; +var memberSearchIndex; +var tagSearchIndex; +function loadScripts(doc, tag) { + createElem(doc, tag, 'search.js'); + + createElem(doc, tag, 'module-search-index.js'); + createElem(doc, tag, 'package-search-index.js'); + createElem(doc, tag, 'type-search-index.js'); + createElem(doc, tag, 'member-search-index.js'); + createElem(doc, tag, 'tag-search-index.js'); +} + +function createElem(doc, tag, path) { + var script = doc.createElement(tag); + var scriptElement = doc.getElementsByTagName(tag)[0]; + script.src = pathtoroot + path; + scriptElement.parentNode.insertBefore(script, scriptElement); +} + +function show(tableId, selected, columns) { + if (tableId !== selected) { + document.querySelectorAll('div.' + tableId + ':not(.' + selected + ')') + .forEach(function(elem) { + elem.style.display = 'none'; + }); + } + document.querySelectorAll('div.' + selected) + .forEach(function(elem, index) { + elem.style.display = ''; + var isEvenRow = index % (columns * 2) < columns; + elem.classList.remove(isEvenRow ? oddRowColor : evenRowColor); + elem.classList.add(isEvenRow ? evenRowColor : oddRowColor); + }); + updateTabs(tableId, selected); +} + +function updateTabs(tableId, selected) { + document.querySelector('div#' + tableId +' .summary-table') + .setAttribute('aria-labelledby', selected); + document.querySelectorAll('button[id^="' + tableId + '"]') + .forEach(function(tab, index) { + if (selected === tab.id || (tableId === selected && index === 0)) { + tab.className = activeTableTab; + tab.setAttribute('aria-selected', true); + tab.setAttribute('tabindex',0); + } else { + tab.className = tableTab; + tab.setAttribute('aria-selected', false); + tab.setAttribute('tabindex',-1); + } + }); +} + +function switchTab(e) { + var selected = document.querySelector('[aria-selected=true]'); + if (selected) { + if ((e.keyCode === 37 || e.keyCode === 38) && selected.previousSibling) { + // left or up arrow key pressed: move focus to previous tab + selected.previousSibling.click(); + selected.previousSibling.focus(); + e.preventDefault(); + } else if ((e.keyCode === 39 || e.keyCode === 40) && selected.nextSibling) { + // right or down arrow key pressed: move focus to next tab + selected.nextSibling.click(); + selected.nextSibling.focus(); + e.preventDefault(); + } + } +} + +var updateSearchResults = function() {}; + +function indexFilesLoaded() { + return moduleSearchIndex + && packageSearchIndex + && typeSearchIndex + && memberSearchIndex + && tagSearchIndex; +} + +// Workaround for scroll position not being included in browser history (8249133) +document.addEventListener("DOMContentLoaded", function(e) { + var contentDiv = document.querySelector("div.flex-content"); + window.addEventListener("popstate", function(e) { + if (e.state !== null) { + contentDiv.scrollTop = e.state; + } + }); + window.addEventListener("hashchange", function(e) { + history.replaceState(contentDiv.scrollTop, document.title); + }); + contentDiv.addEventListener("scroll", function(e) { + var timeoutID; + if (!timeoutID) { + timeoutID = setTimeout(function() { + history.replaceState(contentDiv.scrollTop, document.title); + timeoutID = null; + }, 100); + } + }); + if (!location.hash) { + history.replaceState(contentDiv.scrollTop, document.title); + } +}); diff --git a/livraison/doc/server/search.js b/livraison/doc/server/search.js new file mode 100644 index 0000000..13aba85 --- /dev/null +++ b/livraison/doc/server/search.js @@ -0,0 +1,354 @@ +/* + * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ + +var noResult = {l: "No results found"}; +var loading = {l: "Loading search index..."}; +var catModules = "Modules"; +var catPackages = "Packages"; +var catTypes = "Classes and Interfaces"; +var catMembers = "Members"; +var catSearchTags = "Search Tags"; +var highlight = "$&"; +var searchPattern = ""; +var fallbackPattern = ""; +var RANKING_THRESHOLD = 2; +var NO_MATCH = 0xffff; +var MIN_RESULTS = 3; +var MAX_RESULTS = 500; +var UNNAMED = ""; +function escapeHtml(str) { + return str.replace(//g, ">"); +} +function getHighlightedText(item, matcher, fallbackMatcher) { + var escapedItem = escapeHtml(item); + var highlighted = escapedItem.replace(matcher, highlight); + if (highlighted === escapedItem) { + highlighted = escapedItem.replace(fallbackMatcher, highlight) + } + return highlighted; +} +function getURLPrefix(ui) { + var urlPrefix=""; + var slash = "/"; + if (ui.item.category === catModules) { + return ui.item.l + slash; + } else if (ui.item.category === catPackages && ui.item.m) { + return ui.item.m + slash; + } else if (ui.item.category === catTypes || ui.item.category === catMembers) { + if (ui.item.m) { + urlPrefix = ui.item.m + slash; + } else { + $.each(packageSearchIndex, function(index, item) { + if (item.m && ui.item.p === item.l) { + urlPrefix = item.m + slash; + } + }); + } + } + return urlPrefix; +} +function createSearchPattern(term) { + var pattern = ""; + var isWordToken = false; + term.replace(/,\s*/g, ", ").trim().split(/\s+/).forEach(function(w, index) { + if (index > 0) { + // whitespace between identifiers is significant + pattern += (isWordToken && /^\w/.test(w)) ? "\\s+" : "\\s*"; + } + var tokens = w.split(/(?=[A-Z,.()<>[\/])/); + for (var i = 0; i < tokens.length; i++) { + var s = tokens[i]; + if (s === "") { + continue; + } + pattern += $.ui.autocomplete.escapeRegex(s); + isWordToken = /\w$/.test(s); + if (isWordToken) { + pattern += "([a-z0-9_$<>\\[\\]]*?)"; + } + } + }); + return pattern; +} +function createMatcher(pattern, flags) { + var isCamelCase = /[A-Z]/.test(pattern); + return new RegExp(pattern, flags + (isCamelCase ? "" : "i")); +} +var watermark = 'Search'; +$(function() { + var search = $("#search-input"); + var reset = $("#reset-button"); + search.val(''); + search.prop("disabled", false); + reset.prop("disabled", false); + search.val(watermark).addClass('watermark'); + search.blur(function() { + if ($(this).val().length === 0) { + $(this).val(watermark).addClass('watermark'); + } + }); + search.on('click keydown paste', function() { + if ($(this).val() === watermark) { + $(this).val('').removeClass('watermark'); + } + }); + reset.click(function() { + search.val('').focus(); + }); + search.focus()[0].setSelectionRange(0, 0); +}); +$.widget("custom.catcomplete", $.ui.autocomplete, { + _create: function() { + this._super(); + this.widget().menu("option", "items", "> :not(.ui-autocomplete-category)"); + }, + _renderMenu: function(ul, items) { + var rMenu = this; + var currentCategory = ""; + rMenu.menu.bindings = $(); + $.each(items, function(index, item) { + var li; + if (item.category && item.category !== currentCategory) { + ul.append("
        • " + item.category + "
        • "); + currentCategory = item.category; + } + li = rMenu._renderItemData(ul, item); + if (item.category) { + li.attr("aria-label", item.category + " : " + item.l); + li.attr("class", "result-item"); + } else { + li.attr("aria-label", item.l); + li.attr("class", "result-item"); + } + }); + }, + _renderItem: function(ul, item) { + var label = ""; + var matcher = createMatcher(escapeHtml(searchPattern), "g"); + var fallbackMatcher = new RegExp(fallbackPattern, "gi") + if (item.category === catModules) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catPackages) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catTypes) { + label = (item.p && item.p !== UNNAMED) + ? getHighlightedText(item.p + "." + item.l, matcher, fallbackMatcher) + : getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catMembers) { + label = (item.p && item.p !== UNNAMED) + ? getHighlightedText(item.p + "." + item.c + "." + item.l, matcher, fallbackMatcher) + : getHighlightedText(item.c + "." + item.l, matcher, fallbackMatcher); + } else if (item.category === catSearchTags) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else { + label = item.l; + } + var li = $("
        • ").appendTo(ul); + var div = $("
          ").appendTo(li); + if (item.category === catSearchTags && item.h) { + if (item.d) { + div.html(label + " (" + item.h + ")
          " + + item.d + "
          "); + } else { + div.html(label + " (" + item.h + ")"); + } + } else { + if (item.m) { + div.html(item.m + "/" + label); + } else { + div.html(label); + } + } + return li; + } +}); +function rankMatch(match, category) { + if (!match) { + return NO_MATCH; + } + var index = match.index; + var input = match.input; + var leftBoundaryMatch = 2; + var periferalMatch = 0; + // make sure match is anchored on a left word boundary + if (index === 0 || /\W/.test(input[index - 1]) || "_" === input[index]) { + leftBoundaryMatch = 0; + } else if ("_" === input[index - 1] || (input[index] === input[index].toUpperCase() && !/^[A-Z0-9_$]+$/.test(input))) { + leftBoundaryMatch = 1; + } + var matchEnd = index + match[0].length; + var leftParen = input.indexOf("("); + var endOfName = leftParen > -1 ? leftParen : input.length; + // exclude peripheral matches + if (category !== catModules && category !== catSearchTags) { + var delim = category === catPackages ? "/" : "."; + if (leftParen > -1 && leftParen < index) { + periferalMatch += 2; + } else if (input.lastIndexOf(delim, endOfName) >= matchEnd) { + periferalMatch += 2; + } + } + var delta = match[0].length === endOfName ? 0 : 1; // rank full match higher than partial match + for (var i = 1; i < match.length; i++) { + // lower ranking if parts of the name are missing + if (match[i]) + delta += match[i].length; + } + if (category === catTypes) { + // lower ranking if a type name contains unmatched camel-case parts + if (/[A-Z]/.test(input.substring(matchEnd))) + delta += 5; + if (/[A-Z]/.test(input.substring(0, index))) + delta += 5; + } + return leftBoundaryMatch + periferalMatch + (delta / 200); + +} +function doSearch(request, response) { + var result = []; + searchPattern = createSearchPattern(request.term); + fallbackPattern = createSearchPattern(request.term.toLowerCase()); + if (searchPattern === "") { + return this.close(); + } + var camelCaseMatcher = createMatcher(searchPattern, ""); + var fallbackMatcher = new RegExp(fallbackPattern, "i"); + + function searchIndexWithMatcher(indexArray, matcher, category, nameFunc) { + if (indexArray) { + var newResults = []; + $.each(indexArray, function (i, item) { + item.category = category; + var ranking = rankMatch(matcher.exec(nameFunc(item)), category); + if (ranking < RANKING_THRESHOLD) { + newResults.push({ranking: ranking, item: item}); + } + return newResults.length <= MAX_RESULTS; + }); + return newResults.sort(function(e1, e2) { + return e1.ranking - e2.ranking; + }).map(function(e) { + return e.item; + }); + } + return []; + } + function searchIndex(indexArray, category, nameFunc) { + var primaryResults = searchIndexWithMatcher(indexArray, camelCaseMatcher, category, nameFunc); + result = result.concat(primaryResults); + if (primaryResults.length <= MIN_RESULTS && !camelCaseMatcher.ignoreCase) { + var secondaryResults = searchIndexWithMatcher(indexArray, fallbackMatcher, category, nameFunc); + result = result.concat(secondaryResults.filter(function (item) { + return primaryResults.indexOf(item) === -1; + })); + } + } + + searchIndex(moduleSearchIndex, catModules, function(item) { return item.l; }); + searchIndex(packageSearchIndex, catPackages, function(item) { + return (item.m && request.term.indexOf("/") > -1) + ? (item.m + "/" + item.l) : item.l; + }); + searchIndex(typeSearchIndex, catTypes, function(item) { + return request.term.indexOf(".") > -1 ? item.p + "." + item.l : item.l; + }); + searchIndex(memberSearchIndex, catMembers, function(item) { + return request.term.indexOf(".") > -1 + ? item.p + "." + item.c + "." + item.l : item.l; + }); + searchIndex(tagSearchIndex, catSearchTags, function(item) { return item.l; }); + + if (!indexFilesLoaded()) { + updateSearchResults = function() { + doSearch(request, response); + } + result.unshift(loading); + } else { + updateSearchResults = function() {}; + } + response(result); +} +$(function() { + $("#search-input").catcomplete({ + minLength: 1, + delay: 300, + source: doSearch, + response: function(event, ui) { + if (!ui.content.length) { + ui.content.push(noResult); + } else { + $("#search-input").empty(); + } + }, + autoFocus: true, + focus: function(event, ui) { + return false; + }, + position: { + collision: "flip" + }, + select: function(event, ui) { + if (ui.item.category) { + var url = getURLPrefix(ui); + if (ui.item.category === catModules) { + url += "module-summary.html"; + } else if (ui.item.category === catPackages) { + if (ui.item.u) { + url = ui.item.u; + } else { + url += ui.item.l.replace(/\./g, '/') + "/package-summary.html"; + } + } else if (ui.item.category === catTypes) { + if (ui.item.u) { + url = ui.item.u; + } else if (ui.item.p === UNNAMED) { + url += ui.item.l + ".html"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.l + ".html"; + } + } else if (ui.item.category === catMembers) { + if (ui.item.p === UNNAMED) { + url += ui.item.c + ".html" + "#"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.c + ".html" + "#"; + } + if (ui.item.u) { + url += ui.item.u; + } else { + url += ui.item.l; + } + } else if (ui.item.category === catSearchTags) { + url += ui.item.u; + } + if (top !== window) { + parent.classFrame.location = pathtoroot + url; + } else { + window.location.href = pathtoroot + url; + } + $("#search-input").focus(); + } + } + }); +}); diff --git a/livraison/doc/server/serialized-form.html b/livraison/doc/server/serialized-form.html new file mode 100644 index 0000000..cac8889 --- /dev/null +++ b/livraison/doc/server/serialized-form.html @@ -0,0 +1,90 @@ + + + + +Serialized Form (server API) + + + + + + + + + + + + + + +
          + +
          +
          +
          +

          Serialized Form

          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/ServerMain.html b/livraison/doc/server/server/fr/lnl/game/server/ServerMain.html new file mode 100644 index 0000000..531e7b7 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/ServerMain.html @@ -0,0 +1,158 @@ + + + + +ServerMain (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class ServerMain

          +
          +
          java.lang.Object +
          fr.lnl.game.server.ServerMain
          +
          +
          +
          +
          public class ServerMain +extends Object
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              ServerMain

              +
              public ServerMain()
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              main

              +
              public static void main(String[] args)
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/Game.html b/livraison/doc/server/server/fr/lnl/game/server/games/Game.html new file mode 100644 index 0000000..287817e --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/Game.html @@ -0,0 +1,471 @@ + + + + +Game (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class Game

          +
          +
          java.lang.Object +
          fr.lnl.game.server.games.Game
          +
          +
          +
          +
          public class Game +extends Object
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Field Details

            +
              +
            • +
              +

              grid

              +
              private final Grid grid
              +
              +
            • +
            • +
              +

              players

              +
              private final List<Player> players
              +
              +
            • +
            • +
              +

              currentPlayer

              +
              private Player currentPlayer
              +
              +
            • +
            • +
              +

              selectedAction

              +
              private Action selectedAction
              +
              +
            • +
            • +
              +

              nbrTurn

              +
              private int nbrTurn
              +
              +
            • +
            • +
              +

              previousPlayer

              +
              private Player previousPlayer
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Constructor Details

            + +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              initGame

              +
              public void initGame(GridFactoryBuilder buildStrategy)
              +
              Initialize a game by placing players on the grid and by generating current player available actions
              +
              +
              Parameters:
              +
              buildStrategy - builder used to create a grid
              +
              +
              +
            • +
            • +
              +

              play

              +
              public boolean play()
              +
              Game "main" method, call by a controller after human chose an action or when a computer player play an action + Method is call everytime an action has been chosen by a human or when aa computer player need to play
              +
              +
              Returns:
              +
              true if game is over, false otherwise
              +
              +
              +
            • +
            • +
              +

              gridPlayersUpdate

              +
              private void gridPlayersUpdate()
              +
              Remove dead players from the grid
              +
              +
            • +
            • +
              +

              countdownGridElementsUpdate

              +
              private void countdownGridElementsUpdate()
              +
              play grid's elements that use a timer like Bomb at each game tick
              +
              +
            • +
            • +
              +

              generateAndGetPlayerActions

              +
              public List<Action> generateAndGetPlayerActions(Player player)
              +
              Used to list all actions a player can execute at current time
              +
              +
              Parameters:
              +
              player - the player to generate actions
              +
              Returns:
              +
              a list of available actions
              +
              +
              +
            • +
            • +
              +

              getPlayersAlive

              +
              public Stream<Player> getPlayersAlive()
              +
              +
              Returns:
              +
              a list of alive players
              +
              +
              +
            • +
            • +
              +

              getPlayersNotAlive

              +
              public Stream<Player> getPlayersNotAlive()
              +
              Opposite of getPlayersAlive()
              +
              +
              Returns:
              +
              a list of dead players
              +
              +
              +
            • +
            • +
              +

              isOver

              +
              public boolean isOver()
              +
              A game is over if the number of alive players is inferior to 2
              +
              +
              Returns:
              +
              true if game is over, false otherwise
              +
              +
              +
            • +
            • +
              +

              getWinner

              +
              public Player getWinner()
              +
              +
              Returns:
              +
              the winner of the game if exists, null otherwise.
              + return the only remaining alive player when it exists, or null if everyone is dead, per example when a bomb kill + the 2 remaining players
              +
              +
              +
            • +
            • +
              +

              getCurrentPlayer

              +
              public Player getCurrentPlayer()
              +
              +
              Returns:
              +
              the player who is currently playing
              +
              +
              +
            • +
            • +
              +

              nextCurrentPlayer

              +
              public void nextCurrentPlayer()
              +
              Change player to the next available in the list.
              + We set its shield deploy state to false.
              +
              +
            • +
            • +
              +

              setCurrentPlayer

              +
              public void setCurrentPlayer(Player current_player)
              +
              +
              Parameters:
              +
              current_player - the new current player
              +
              +
              +
            • +
            • +
              +

              getGrid

              +
              public Grid getGrid()
              +
              +
            • +
            • +
              +

              getPlayers

              +
              public List<Player> getPlayers()
              +
              +
            • +
            • +
              +

              getSelectedAction

              +
              public Action getSelectedAction()
              +
              +
              Returns:
              +
              action selected by current player if not already executed or last player if already executed
              +
              +
              +
            • +
            • +
              +

              setSelectedAction

              +
              public void setSelectedAction(Action selectedAction)
              +
              +
              Parameters:
              +
              selectedAction - set the action selected by current player before doing it
              +
              +
              +
            • +
            • +
              +

              getNbrTurn

              +
              public int getNbrTurn()
              +
              +
            • +
            • +
              +

              getPreviousPlayer

              +
              public Player getPreviousPlayer()
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/action/AbstractAction.html b/livraison/doc/server/server/fr/lnl/game/server/games/action/AbstractAction.html new file mode 100644 index 0000000..b04145c --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/action/AbstractAction.html @@ -0,0 +1,179 @@ + + + + +AbstractAction (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class AbstractAction

          +
          +
          java.lang.Object +
          fr.lnl.game.server.games.action.AbstractAction
          +
          +
          +
          +
          All Implemented Interfaces:
          +
          Action
          +
          +
          +
          Direct Known Subclasses:
          +
          DeployShield, DropObject, Move, Nothing, Shot
          +
          +
          +
          public abstract class AbstractAction +extends Object +implements Action
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Field Details

            +
              +
            • +
              +

              game

              +
              protected final Game game
              +
              +
            • +
            • +
              +

              player

              +
              protected final Player player
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              AbstractAction

              +
              public AbstractAction(Game game, + Player player)
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/action/Action.html b/livraison/doc/server/server/fr/lnl/game/server/games/action/Action.html new file mode 100644 index 0000000..38a3b4a --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/action/Action.html @@ -0,0 +1,169 @@ + + + + +Action (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Interface Action

          +
          +
          +
          +
          All Known Implementing Classes:
          +
          AbstractAction, DeployShield, DropBomb, DropMine, DropObject, Move, Nothing, Shot
          +
          +
          +
          public interface Action
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              doAction

              +
              void doAction()
              +
              Call by Game when player do this action
              +
              +
            • +
            • +
              +

              isPossible

              +
              boolean isPossible()
              +
              +
              Returns:
              +
              true if this action is possible, false otherwise
              +
              +
              +
            • +
            • +
              +

              getPoint

              +
              Point getPoint()
              +
              Used by Move, Shot and DropObject to list all direction where the action is possible
              +
              +
              Returns:
              +
              a list a point where the action is possible (not block by a wall per example)
              +
              +
              +
            • +
            • +
              +

              getValidPoint

              +
              List<Point> getValidPoint()
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/action/DeployShield.html b/livraison/doc/server/server/fr/lnl/game/server/games/action/DeployShield.html new file mode 100644 index 0000000..7c20cbb --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/action/DeployShield.html @@ -0,0 +1,219 @@ + + + + +DeployShield (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class DeployShield

          +
          +
          java.lang.Object +
          fr.lnl.game.server.games.action.AbstractAction +
          fr.lnl.game.server.games.action.DeployShield
          +
          +
          +
          +
          +
          All Implemented Interfaces:
          +
          Action
          +
          +
          +
          public class DeployShield +extends AbstractAction
          +
          Used when a player want to protect himself from taking damage (shield state is reset to false at next player turn)
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              DeployShield

              +
              public DeployShield(Player player)
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              doAction

              +
              public void doAction()
              +
              Deploy player shield and decrement its energy
              +
              +
            • +
            • +
              +

              isPossible

              +
              public boolean isPossible()
              +
              This action is always possible
              +
              +
              Returns:
              +
              always true
              +
              +
              +
            • +
            • +
              +

              getPoint

              +
              public Point getPoint()
              +
              Description copied from interface: Action
              +
              Used by Move, Shot and DropObject to list all direction where the action is possible
              +
              +
              Returns:
              +
              a list a point where the action is possible (not block by a wall per example)
              +
              +
              +
            • +
            • +
              +

              getValidPoint

              +
              public List<Point> getValidPoint()
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/action/Direction.html b/livraison/doc/server/server/fr/lnl/game/server/games/action/Direction.html new file mode 100644 index 0000000..1048eb6 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/action/Direction.html @@ -0,0 +1,137 @@ + + + + +Direction (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Interface Direction

          +
          +
          +
          +
          All Known Implementing Classes:
          +
          Direction4Axis, Direction8Axis
          +
          +
          +
          public interface Direction
          +
          +
          +
            + +
          • +
            +

            Method Summary

            +
            +
            +
            +
            +
            Modifier and Type
            +
            Method
            +
            Description
            +
            int
            + +
             
            +
            int
            + +
             
            +
            +
            +
            +
            +
          • +
          +
          +
          +
            + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              getDeltaX

              +
              int getDeltaX()
              +
              +
            • +
            • +
              +

              getDeltaY

              +
              int getDeltaY()
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/action/Direction4Axis.html b/livraison/doc/server/server/fr/lnl/game/server/games/action/Direction4Axis.html new file mode 100644 index 0000000..72c4414 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/action/Direction4Axis.html @@ -0,0 +1,359 @@ + + + + +Direction4Axis (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Enum Class Direction4Axis

          +
          +
          java.lang.Object +
          java.lang.Enum<Direction4Axis> +
          fr.lnl.game.server.games.action.Direction4Axis
          +
          +
          +
          +
          +
          All Implemented Interfaces:
          +
          Direction, Serializable, Comparable<Direction4Axis>, Constable
          +
          +
          +
          public enum Direction4Axis +extends Enum<Direction4Axis> +implements Direction
          +
          Enum used to chose where to move, shot, etc.
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Enum Constant Details

            + +
            +
          • + +
          • +
            +

            Field Details

            +
              +
            • +
              +

              deltaX

              +
              private final int deltaX
              +
              +
            • +
            • +
              +

              deltaY

              +
              private final int deltaY
              +
              +
            • +
            • +
              +

              isVertical

              +
              private final boolean isVertical
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              Direction4Axis

              +
              private Direction4Axis(int i, + int i1, + boolean isVertical)
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              values

              +
              public static Direction4Axis[] values()
              +
              Returns an array containing the constants of this enum class, in +the order they are declared.
              +
              +
              Returns:
              +
              an array containing the constants of this enum class, in the order they are declared
              +
              +
              +
            • +
            • +
              +

              valueOf

              +
              public static Direction4Axis valueOf(String name)
              +
              Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
              +
              +
              Parameters:
              +
              name - the name of the enum constant to be returned.
              +
              Returns:
              +
              the enum constant with the specified name
              +
              Throws:
              +
              IllegalArgumentException - if this enum class has no constant with the specified name
              +
              NullPointerException - if the argument is null
              +
              +
              +
            • +
            • +
              +

              getDeltaX

              +
              public int getDeltaX()
              +
              +
              Specified by:
              +
              getDeltaX in interface Direction
              +
              +
              +
            • +
            • +
              +

              getDeltaY

              +
              public int getDeltaY()
              +
              +
              Specified by:
              +
              getDeltaY in interface Direction
              +
              +
              +
            • +
            • +
              +

              isVertical

              +
              public boolean isVertical()
              +
              Used by Shot to know if the direction is in vertical direction cause shot action can have a different + distance depending on the direction
              +
              +
              Returns:
              +
              true if the direction is vertical
              +
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/action/Direction8Axis.html b/livraison/doc/server/server/fr/lnl/game/server/games/action/Direction8Axis.html new file mode 100644 index 0000000..9f3ad4d --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/action/Direction8Axis.html @@ -0,0 +1,361 @@ + + + + +Direction8Axis (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Enum Class Direction8Axis

          +
          +
          java.lang.Object +
          java.lang.Enum<Direction8Axis> +
          fr.lnl.game.server.games.action.Direction8Axis
          +
          +
          +
          +
          +
          All Implemented Interfaces:
          +
          Direction, Serializable, Comparable<Direction8Axis>, Constable
          +
          +
          +
          public enum Direction8Axis +extends Enum<Direction8Axis> +implements Direction
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Enum Constant Details

            + +
            +
          • + +
          • +
            +

            Field Details

            +
              +
            • +
              +

              deltaX

              +
              private final int deltaX
              +
              +
            • +
            • +
              +

              deltaY

              +
              private final int deltaY
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              Direction8Axis

              +
              private Direction8Axis(int i, + int i1)
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              values

              +
              public static Direction8Axis[] values()
              +
              Returns an array containing the constants of this enum class, in +the order they are declared.
              +
              +
              Returns:
              +
              an array containing the constants of this enum class, in the order they are declared
              +
              +
              +
            • +
            • +
              +

              valueOf

              +
              public static Direction8Axis valueOf(String name)
              +
              Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
              +
              +
              Parameters:
              +
              name - the name of the enum constant to be returned.
              +
              Returns:
              +
              the enum constant with the specified name
              +
              Throws:
              +
              IllegalArgumentException - if this enum class has no constant with the specified name
              +
              NullPointerException - if the argument is null
              +
              +
              +
            • +
            • +
              +

              getDeltaX

              +
              public int getDeltaX()
              +
              +
              Specified by:
              +
              getDeltaX in interface Direction
              +
              +
              +
            • +
            • +
              +

              getDeltaY

              +
              public int getDeltaY()
              +
              +
              Specified by:
              +
              getDeltaY in interface Direction
              +
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/action/DropBomb.html b/livraison/doc/server/server/fr/lnl/game/server/games/action/DropBomb.html new file mode 100644 index 0000000..cd9945a --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/action/DropBomb.html @@ -0,0 +1,194 @@ + + + + +DropBomb (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class DropBomb

          +
          + +
          +
          +
          All Implemented Interfaces:
          +
          Action
          +
          +
          +
          public class DropBomb +extends DropObject
          +
          Used when player want to drop a Bomb, bomb explode when someone walks on it and after 3 turns
          +
          +
          + +
          +
          + +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/action/DropMine.html b/livraison/doc/server/server/fr/lnl/game/server/games/action/DropMine.html new file mode 100644 index 0000000..6f086f2 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/action/DropMine.html @@ -0,0 +1,194 @@ + + + + +DropMine (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class DropMine

          +
          + +
          +
          +
          All Implemented Interfaces:
          +
          Action
          +
          +
          +
          public class DropMine +extends DropObject
          +
          Used when player want to drop a Mine, Mine only explode when someone walks on it
          +
          +
          + +
          +
          + +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/action/DropObject.html b/livraison/doc/server/server/fr/lnl/game/server/games/action/DropObject.html new file mode 100644 index 0000000..4ecfd27 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/action/DropObject.html @@ -0,0 +1,275 @@ + + + + +DropObject (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class DropObject

          +
          +
          java.lang.Object +
          fr.lnl.game.server.games.action.AbstractAction +
          fr.lnl.game.server.games.action.DropObject
          +
          +
          +
          +
          +
          All Implemented Interfaces:
          +
          Action
          +
          +
          +
          Direct Known Subclasses:
          +
          DropBomb, DropMine
          +
          +
          +
          public abstract class DropObject +extends AbstractAction
          +
          Super class used by DropMine and DropBomb
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Field Details

            +
              +
            • +
              +

              point

              +
              protected final Point point
              +
              +
            • +
            • +
              +

              direction

              +
              private final Direction8Axis direction
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Constructor Details

            + +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              isPossible

              +
              public boolean isPossible()
              +
              +
              Returns:
              +
              true if player can play this action in current context, false otherwise
              +
              +
              +
            • +
            • +
              +

              getValidPoint

              +
              public List<Point> getValidPoint()
              +
              +
              Returns:
              +
              a list of point where it's possible to place a bomb of a mine. + We add a point where there is nothing on the board.
              +
              See Also:
              +
              + +
              +
              +
              +
            • +
            • +
              +

              getDirection

              +
              public Direction8Axis getDirection()
              +
              +
            • +
            • +
              +

              getPoint

              +
              public Point getPoint()
              +
              Description copied from interface: Action
              +
              Used by Move, Shot and DropObject to list all direction where the action is possible
              +
              +
              Returns:
              +
              a list a point where the action is possible (not block by a wall per example)
              +
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/action/Move.html b/livraison/doc/server/server/fr/lnl/game/server/games/action/Move.html new file mode 100644 index 0000000..4e46a39 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/action/Move.html @@ -0,0 +1,277 @@ + + + + +Move (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class Move

          +
          +
          java.lang.Object +
          fr.lnl.game.server.games.action.AbstractAction +
          fr.lnl.game.server.games.action.Move
          +
          +
          +
          +
          +
          All Implemented Interfaces:
          +
          Action
          +
          +
          +
          public class Move +extends AbstractAction
          +
          Used when the player want to move in a direction, it can move in a direction when there is another player or a wall
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Field Details

            +
              +
            • +
              +

              point

              +
              private final Point point
              +
              +
            • +
            • +
              +

              direction

              +
              private final Direction4Axis direction
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Constructor Details

            + +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              doAction

              +
              public void doAction()
              +
              Move player to its new position and decrement its point
              +
              +
            • +
            • +
              +

              isPossible

              +
              public boolean isPossible()
              +
              +
              Returns:
              +
              true if player can play this action in current context, false otherwise
              +
              +
              +
            • +
            • +
              +

              getValidPoint

              +
              public List<Point> getValidPoint()
              +
              +
              Returns:
              +
              a list of point where it's possible to move. + We add a point to the list where there is nothing on the board.
              +
              See Also:
              +
              + +
              +
              +
              +
            • +
            • +
              +

              getPoint

              +
              public Point getPoint()
              +
              Description copied from interface: Action
              +
              Used by Move, Shot and DropObject to list all direction where the action is possible
              +
              +
              Returns:
              +
              a list a point where the action is possible (not block by a wall per example)
              +
              +
              +
            • +
            • +
              +

              getDirection

              +
              public Direction4Axis getDirection()
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/action/NoMoreBulletInWeaponException.html b/livraison/doc/server/server/fr/lnl/game/server/games/action/NoMoreBulletInWeaponException.html new file mode 100644 index 0000000..7b87a18 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/action/NoMoreBulletInWeaponException.html @@ -0,0 +1,147 @@ + + + + +NoMoreBulletInWeaponException (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class NoMoreBulletInWeaponException

          +
          +
          java.lang.Object +
          java.lang.Throwable +
          java.lang.Exception +
          fr.lnl.game.server.games.action.NoMoreBulletInWeaponException
          +
          +
          +
          +
          +
          +
          All Implemented Interfaces:
          +
          Serializable
          +
          +
          +
          public class NoMoreBulletInWeaponException +extends Exception
          +
          This exception is throw when player has no remaining bullet
          +
          +
          See Also:
          +
          + +
          +
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              NoMoreBulletInWeaponException

              +
              public NoMoreBulletInWeaponException()
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/action/NotValidDirectionException.html b/livraison/doc/server/server/fr/lnl/game/server/games/action/NotValidDirectionException.html new file mode 100644 index 0000000..d06fc03 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/action/NotValidDirectionException.html @@ -0,0 +1,147 @@ + + + + +NotValidDirectionException (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class NotValidDirectionException

          +
          +
          java.lang.Object +
          java.lang.Throwable +
          java.lang.Exception +
          fr.lnl.game.server.games.action.NotValidDirectionException
          +
          +
          +
          +
          +
          +
          All Implemented Interfaces:
          +
          Serializable
          +
          +
          +
          public class NotValidDirectionException +extends Exception
          +
          throw when action instantiated and the chosen direction in constructor isn't valid
          +
          +
          See Also:
          +
          + +
          +
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              NotValidDirectionException

              +
              public NotValidDirectionException(String message)
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/action/Nothing.html b/livraison/doc/server/server/fr/lnl/game/server/games/action/Nothing.html new file mode 100644 index 0000000..2fdf389 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/action/Nothing.html @@ -0,0 +1,219 @@ + + + + +Nothing (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class Nothing

          +
          +
          java.lang.Object +
          fr.lnl.game.server.games.action.AbstractAction +
          fr.lnl.game.server.games.action.Nothing
          +
          +
          +
          +
          +
          All Implemented Interfaces:
          +
          Action
          +
          +
          +
          public class Nothing +extends AbstractAction
          +
          This action is used when player doesn't want to move and/or loose energy
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              Nothing

              +
              public Nothing()
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              doAction

              +
              public void doAction()
              +
              doAction in this context don't execute any operation
              +
              +
            • +
            • +
              +

              isPossible

              +
              public boolean isPossible()
              +
              This action is always possible
              +
              +
              Returns:
              +
              always true
              +
              +
              +
            • +
            • +
              +

              getPoint

              +
              public Point getPoint()
              +
              Description copied from interface: Action
              +
              Used by Move, Shot and DropObject to list all direction where the action is possible
              +
              +
              Returns:
              +
              a list a point where the action is possible (not block by a wall per example)
              +
              +
              +
            • +
            • +
              +

              getValidPoint

              +
              public List<Point> getValidPoint()
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/action/ReunionSameAction.html b/livraison/doc/server/server/fr/lnl/game/server/games/action/ReunionSameAction.html new file mode 100644 index 0000000..0f9c756 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/action/ReunionSameAction.html @@ -0,0 +1,235 @@ + + + + +ReunionSameAction (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class ReunionSameAction

          +
          +
          java.lang.Object +
          fr.lnl.game.server.games.action.ReunionSameAction
          +
          +
          +
          +
          public class ReunionSameAction +extends Object
          +
          When we generate action, we generate one per available direction (like in Move) but to improve human + readability, we list every same Action here
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Field Details

            +
              +
            • +
              +

              actionName

              +
              private final String actionName
              +
              +
            • +
            • +
              +

              actions

              +
              private List<Action> actions
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              ReunionSameAction

              +
              public ReunionSameAction(String actionName)
              +
              +
            • +
            • +
              +

              ReunionSameAction

              +
              public ReunionSameAction(String actionName, + Action action)
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              getActions

              +
              public List<Action> getActions()
              +
              +
            • +
            • +
              +

              getActionName

              +
              public String getActionName()
              +
              +
            • +
            • +
              +

              getAction

              +
              public Action getAction(int value)
              +
              +
            • +
            • +
              +

              addAction

              +
              public void addAction(Action action)
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/action/Shot.html b/livraison/doc/server/server/fr/lnl/game/server/games/action/Shot.html new file mode 100644 index 0000000..eef30b1 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/action/Shot.html @@ -0,0 +1,306 @@ + + + + +Shot (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class Shot

          +
          +
          java.lang.Object +
          fr.lnl.game.server.games.action.AbstractAction +
          fr.lnl.game.server.games.action.Shot
          +
          +
          +
          +
          +
          All Implemented Interfaces:
          +
          Action
          +
          +
          +
          public class Shot +extends AbstractAction
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Field Details

            +
              +
            • +
              +

              point

              +
              private final Point point
              +
              +
            • +
            • +
              +

              direction

              +
              private final Direction4Axis direction
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Constructor Details

            + +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              doAction

              +
              public void doAction()
              +
              We decrement player's energy and shot on every of its opponents on the chosen direction by decrementing its + energy too
              +
              +
            • +
            • +
              +

              isPossible

              +
              public boolean isPossible()
              +
              +
              Returns:
              +
              true if player can play this action in current context, false otherwise
              +
              +
              +
            • +
            • +
              +

              getValidPoint

              +
              public List<Point> getValidPoint()
              +
              +
              Returns:
              +
              a list of point where it's possible to shot. + We add a point to the list where there is a player depending on the direction and the distance the weapon can + shoot.
              +
              See Also:
              +
              + +
              +
              +
              +
            • +
            • +
              +

              seeNeighbour

              +
              public Point seeNeighbour(Point point, + int deltaX, + int deltaY, + int range)
              +
              +
              Parameters:
              +
              point - player current position
              +
              deltaX - given by Direction4Axis
              +
              deltaY - given by Direction4Axis
              +
              range - given by Weapon.getHorizontalDistance() or Weapon.getVerticalDistance()
              +
              Returns:
              +
              true if there is a player in the chosen direction, false otherwise
              +
              +
              +
            • +
            • +
              +

              getPoint

              +
              public Point getPoint()
              +
              Description copied from interface: Action
              +
              Used by Move, Shot and DropObject to list all direction where the action is possible
              +
              +
              Returns:
              +
              a list a point where the action is possible (not block by a wall per example)
              +
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/action/package-summary.html b/livraison/doc/server/server/fr/lnl/game/server/games/action/package-summary.html new file mode 100644 index 0000000..e428e16 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/action/package-summary.html @@ -0,0 +1,165 @@ + + + + +fr.lnl.game.server.games.action (server API) + + + + + + + + + + + + + + +
          + +
          +
          +
          +
          Module server
          +

          Package fr.lnl.game.server.games.action

          +
          +
          +
          package fr.lnl.game.server.games.action
          +
          +
          Package storing all actions a player can do
          +
          +
          +
            +
          • + +
          • +
          • +
            +
            +
            +
            +
            Class
            +
            Description
            + +
             
            + +
             
            + +
            +
            Used when a player want to protect himself from taking damage (shield state is reset to false at next player turn)
            +
            + +
             
            + +
            +
            Enum used to chose where to move, shot, etc.
            +
            + +
             
            + +
            +
            Used when player want to drop a Bomb, bomb explode when someone walks on it and after 3 turns
            +
            + +
            +
            Used when player want to drop a Mine, Mine only explode when someone walks on it
            +
            + +
            +
            Super class used by DropMine and DropBomb
            +
            + +
            +
            Used when the player want to move in a direction, it can move in a direction when there is another player or a wall
            +
            + +
            +
            This exception is throw when player has no remaining bullet
            +
            + +
            +
            This action is used when player doesn't want to move and/or loose energy
            +
            + +
            +
            throw when action instantiated and the chosen direction in constructor isn't valid
            +
            + +
            +
            When we generate action, we generate one per available direction (like in Move) but to improve human + readability, we list every same Action here
            +
            + +
             
            +
            +
            +
            +
          • +
          +
          +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/action/package-tree.html b/livraison/doc/server/server/fr/lnl/game/server/games/action/package-tree.html new file mode 100644 index 0000000..b15f2d2 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/action/package-tree.html @@ -0,0 +1,116 @@ + + + + +fr.lnl.game.server.games.action Class Hierarchy (server API) + + + + + + + + + + + + + + +
          + +
          +
          +
          +

          Hierarchy For Package fr.lnl.game.server.games.action

          +Package Hierarchies: + +
          +
          +

          Class Hierarchy

          + +
          +
          +

          Interface Hierarchy

          +
            +
          • fr.lnl.game.server.games.action.Action
          • +
          • fr.lnl.game.server.games.action.Direction
          • +
          +
          +
          +

          Enum Class Hierarchy

          + +
          +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/grid/Grid.html b/livraison/doc/server/server/fr/lnl/game/server/games/grid/Grid.html new file mode 100644 index 0000000..e8731d4 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/grid/Grid.html @@ -0,0 +1,396 @@ + + + + +Grid (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class Grid

          +
          +
          java.lang.Object +
          fr.lnl.game.server.games.grid.Grid
          +
          +
          +
          +
          public class Grid +extends Object
          +
          Class managing the board
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Field Details

            +
              +
            • +
              +

              board

              +
              private final HashMap<Point,Pair<Player,Box>> board
              +
              +
            • +
            • +
              +

              row

              +
              private final int row
              +
              +
            • +
            • +
              +

              column

              +
              private final int column
              +
              +
            • +
            • +
              +

              players

              +
              private final List<Player> players
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              Grid

              +
              public Grid(int row, + int column, + List<Player> players)
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              boardPositionIsValid

              +
              public boolean boardPositionIsValid(int row, + int deltaRow, + int column, + int deltaColumn)
              +
              +
              See Also:
              +
              + +
              +
              +
              +
            • +
            • +
              +

              boardPositionIsValid

              +
              public boolean boardPositionIsValid(int row, + int column)
              +
              Check if given position is in grid area
              +
              +
              Returns:
              +
              true if position is valid, false otehrwise
              +
              +
              +
            • +
            • +
              +

              boardPositionIsValid

              +
              public boolean boardPositionIsValid(Point point)
              +
              +
              See Also:
              +
              + +
              +
              +
              +
            • +
            • +
              +

              getNumberNeutralBox

              +
              public int getNumberNeutralBox()
              +
              +
              Returns:
              +
              the number of neutral box
              +
              See Also:
              +
              + +
              +
              +
              +
            • +
            • +
              +

              isNeutralBox

              +
              public boolean isNeutralBox(Box box)
              +
              +
              Parameters:
              +
              box - the box we'll look state
              +
              Returns:
              +
              true if box isn't a Wall or a EnergyBall
              +
              +
              +
            • +
            • +
              +

              toString

              +
              public String toString()
              +
              Given a string representation of the board.
              + Some characters in given string are in UTF-8 and can be poorly displayed if using an incompatible encoding, like + on Windows where french regional encoding is windows-1252
              +
              +
              Overrides:
              +
              toString in class Object
              +
              Returns:
              +
              a string view of a board
              +
              +
              +
            • +
            • +
              +

              privateView

              +
              public String privateView(Player player)
              +
              +
            • +
            • +
              +

              getBoard

              +
              public HashMap<Point,Pair<Player,Box>> getBoard()
              +
              +
            • +
            • +
              +

              getGridPlayer

              +
              public Player getGridPlayer(Point point)
              +
              +
            • +
            • +
              +

              getGridBox

              +
              public Box getGridBox(Point point)
              +
              +
            • +
            • +
              +

              getPlayers

              +
              public List<Player> getPlayers()
              +
              +
            • +
            • +
              +

              getRow

              +
              public int getRow()
              +
              +
            • +
            • +
              +

              getColumn

              +
              public int getColumn()
              +
              +
            • +
            • +
              +

              getAllCountdownElements

              +
              public List<CountdownBox> getAllCountdownElements()
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/grid/build/AbstractGridFactoryBuilder.html b/livraison/doc/server/server/fr/lnl/game/server/games/grid/build/AbstractGridFactoryBuilder.html new file mode 100644 index 0000000..e8fe82c --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/grid/build/AbstractGridFactoryBuilder.html @@ -0,0 +1,430 @@ + + + + +AbstractGridFactoryBuilder (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class AbstractGridFactoryBuilder

          +
          +
          java.lang.Object +
          fr.lnl.game.server.games.grid.build.AbstractGridFactoryBuilder
          +
          +
          +
          +
          All Implemented Interfaces:
          +
          GridFactoryBuilder
          +
          +
          +
          Direct Known Subclasses:
          +
          LockGridFactoryBuilder
          +
          +
          +
          public abstract class AbstractGridFactoryBuilder +extends Object +implements GridFactoryBuilder
          +
          +
          + +
          +
          + +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/grid/build/GridFactoryBuilder.html b/livraison/doc/server/server/fr/lnl/game/server/games/grid/build/GridFactoryBuilder.html new file mode 100644 index 0000000..dc8e6b0 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/grid/build/GridFactoryBuilder.html @@ -0,0 +1,235 @@ + + + + +GridFactoryBuilder (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Interface GridFactoryBuilder

          +
          +
          +
          +
          All Known Implementing Classes:
          +
          AbstractGridFactoryBuilder, LockGridFactoryBuilder
          +
          +
          +
          public interface GridFactoryBuilder
          +
          Factory pattern
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              energyProbability

              +
              GridFactoryBuilder energyProbability(float probability)
              +
              Set energy probability
              +
              +
              Parameters:
              +
              probability - energy probability, which will be used by + AbstractGridFactoryBuilder.initPlaceEnergyBall() when calling build()
              +
              Returns:
              +
              this
              +
              +
              +
            • +
            • +
              +

              wallProbability

              +
              GridFactoryBuilder wallProbability(float probability)
              +
              Set wall probability
              +
              +
              Parameters:
              +
              probability - wall probability, which will be used by + AbstractGridFactoryBuilder.initPlaceInternWall() when calling build()
              +
              Returns:
              +
              this
              +
              +
              +
            • +
            • +
              +

              gridDimensions

              +
              GridFactoryBuilder gridDimensions(int row, + int columns)
              +
              set grid dimensions. + Arguments are given when instancing Grid when using build()
              +
              +
              Parameters:
              +
              row - row grid's size
              +
              columns - columns grid's size
              +
              Returns:
              +
              this
              +
              +
              +
            • +
            • +
              +

              playersList

              +
              GridFactoryBuilder playersList(List<Player> players)
              +
              set players list. + Argument given to Grid when calling build()
              +
              +
              Parameters:
              +
              players - list a players
              +
              Returns:
              +
              this
              +
              +
              +
            • +
            • +
              +

              build

              +
              Grid build()
              +
              Call this method after you call {energyProbability(float)}, + wallProbability(float), gridDimensions(int, int) and + playersList(List), It'll instantiate a new Grid and initialize his components + like border walls, intern walls, and energy using parameters given previously
              +
              +
              Returns:
              +
              an instance of Grid
              +
              +
              +
            • +
            • +
              +

              initPlacePlayers

              +
              void initPlacePlayers()
              +
              call when initializing the game, it'll place player depending on the strategy used by its implementation, + need to be call after build, call an NullPointerException otherwise
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/grid/build/LockGridFactoryBuilder.html b/livraison/doc/server/server/fr/lnl/game/server/games/grid/build/LockGridFactoryBuilder.html new file mode 100644 index 0000000..022ee9c --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/grid/build/LockGridFactoryBuilder.html @@ -0,0 +1,289 @@ + + + + +LockGridFactoryBuilder (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class LockGridFactoryBuilder

          +
          +
          java.lang.Object +
          fr.lnl.game.server.games.grid.build.AbstractGridFactoryBuilder +
          fr.lnl.game.server.games.grid.build.LockGridFactoryBuilder
          +
          +
          +
          +
          +
          All Implemented Interfaces:
          +
          GridFactoryBuilder
          +
          +
          +
          public class LockGridFactoryBuilder +extends AbstractGridFactoryBuilder
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              LockGridFactoryBuilder

              +
              protected LockGridFactoryBuilder()
              +
              this method is protected to avoid new instance outside of GridFactoryBuilder context
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              create

              +
              public static GridFactoryBuilder create()
              +
              +
              Returns:
              +
              a new instance of LockGridFactoryBuilder used to construct a Grid
              +
              +
              +
            • +
            • +
              +

              initGrid

              +
              protected void initGrid()
              +
              Method used to initialize grid
              + We place walls on every border, and we initialize board value as null where there is no need o border walls
              +
              +
              Specified by:
              +
              initGrid in class AbstractGridFactoryBuilder
              +
              See Also:
              +
              + +
              +
              +
              +
            • +
            • +
              +

              initPlaceEnergyBall

              +
              protected void initPlaceEnergyBall()
              +
              Method used to initialize energy balls, we place energy balls using a random value and a probability and where + there is no walls
              +
              +
              Specified by:
              +
              initPlaceEnergyBall in class AbstractGridFactoryBuilder
              +
              See Also:
              +
              + +
              +
              +
              +
            • +
            • +
              +

              initPlaceInternWall

              +
              protected void initPlaceInternWall()
              +
              Method used to place intern walls (opposite of border walls), we place walls using a random value and a + probability and where there is no walls or where the position haven't a lock
              +
              +
              Specified by:
              +
              initPlaceInternWall in class AbstractGridFactoryBuilder
              +
              See Also:
              +
              + +
              +
              +
              +
            • +
            • +
              +

              initPlacePlayers

              +
              public void initPlacePlayers()
              +
              Simply place player randomly where it's possible
              +
              +
            • +
            • +
              +

              getIllusionNumberWallNeighbour

              +
              private int getIllusionNumberWallNeighbour(Point point)
              +
              A locked place is used to try to avoid player to be blocked when playing, + A locked place can't have a wall on it
              +
              +
              Parameters:
              +
              point - the position where we want to place a new wall
              +
              Returns:
              +
              number of walls and locked place around position
              +
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/grid/build/package-summary.html b/livraison/doc/server/server/fr/lnl/game/server/games/grid/build/package-summary.html new file mode 100644 index 0000000..16d7b06 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/grid/build/package-summary.html @@ -0,0 +1,114 @@ + + + + +fr.lnl.game.server.games.grid.build (server API) + + + + + + + + + + + + + + +
          + +
          +
          +
          +
          Module server
          +

          Package fr.lnl.game.server.games.grid.build

          +
          +
          +
          package fr.lnl.game.server.games.grid.build
          +
          +
          Package containing all about Grid construction
          +
          +
          + +
          +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/grid/build/package-tree.html b/livraison/doc/server/server/fr/lnl/game/server/games/grid/build/package-tree.html new file mode 100644 index 0000000..c6d6897 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/grid/build/package-tree.html @@ -0,0 +1,80 @@ + + + + +fr.lnl.game.server.games.grid.build Class Hierarchy (server API) + + + + + + + + + + + + + + +
          + +
          +
          +
          +

          Hierarchy For Package fr.lnl.game.server.games.grid.build

          +Package Hierarchies: + +
          +
          +

          Class Hierarchy

          + +
          +
          +

          Interface Hierarchy

          + +
          +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/AbstractBox.html b/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/AbstractBox.html new file mode 100644 index 0000000..f83a464 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/AbstractBox.html @@ -0,0 +1,223 @@ + + + + +AbstractBox (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class AbstractBox

          +
          +
          java.lang.Object +
          fr.lnl.game.server.games.grid.elements.AbstractBox
          +
          +
          +
          +
          All Implemented Interfaces:
          +
          Box
          +
          +
          +
          Direct Known Subclasses:
          +
          EnergyBall, Explosive, Wall
          +
          +
          +
          public class AbstractBox +extends Object +implements Box
          +
          AbstractBox is instantiable (not an abstract class), but when it's the case, instance doesn't represent anything, + it's only to see if there is a lock on this position or not
          +
          +
          +
            + +
          • +
            +

            Field Summary

            +
            Fields
            +
            +
            Modifier and Type
            +
            Field
            +
            Description
            +
            (package private) boolean
            + +
             
            +
            +
            +
          • + +
          • +
            +

            Constructor Summary

            +
            Constructors
            +
            +
            Constructor
            +
            Description
            + +
             
            +
            +
            +
          • + +
          • +
            +

            Method Summary

            +
            +
            +
            +
            +
            Modifier and Type
            +
            Method
            +
            Description
            +
            boolean
            + +
             
            +
            void
            +
            setLock(boolean lock)
            +
             
            +
            +
            +
            +
            +

            Methods inherited from class java.lang.Object

            +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
            +
            +
          • +
          +
          +
          +
            + +
          • +
            +

            Field Details

            +
              +
            • +
              +

              lock

              +
              boolean lock
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              AbstractBox

              +
              public AbstractBox()
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              setLock

              +
              public void setLock(boolean lock)
              +
              +
              Specified by:
              +
              setLock in interface Box
              +
              +
              +
            • +
            • +
              +

              isLock

              +
              public boolean isLock()
              +
              +
              Specified by:
              +
              isLock in interface Box
              +
              Returns:
              +
              true if this box is locked (can't place wall on this position)
              +
              See Also:
              +
              + +
              +
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/Bomb.html b/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/Bomb.html new file mode 100644 index 0000000..1b0ab57 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/Bomb.html @@ -0,0 +1,293 @@ + + + + +Bomb (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class Bomb

          +
          + +
          +
          +
          All Implemented Interfaces:
          +
          Box, CountdownBox, InteractiveBox
          +
          +
          +
          public class Bomb +extends Explosive +implements CountdownBox
          +
          Bomb are elements which explode when someone walks on it or after a countdown, the explosion area is on multiple cases
          +
          +
          +
            + +
          • +
            +

            Field Summary

            +
            Fields
            +
            +
            Modifier and Type
            +
            Field
            +
            Description
            +
            private int
            + +
            +
            Timer before explosion
            +
            +
            private static final int
            + +
            +
            Explosion size, size is circle, not square
            +
            +
            private final Game
            + +
             
            +
            +
            +

            Fields inherited from class fr.lnl.game.server.games.grid.elements.Explosive

            +player, point
            +
            +

            Fields inherited from class fr.lnl.game.server.games.grid.elements.AbstractBox

            +lock
            +
            +
          • + +
          • +
            +

            Constructor Summary

            +
            Constructors
            +
            +
            Constructor
            +
            Description
            +
            Bomb(Point point, + Game game)
            +
             
            +
            +
            +
          • + +
          • +
            +

            Method Summary

            +
            +
            +
            +
            +
            Modifier and Type
            +
            Method
            +
            Description
            +
            protected void
            +
            explode(Grid grid)
            +
            +
            Apply damage to players and delete this object
            +
            +
            double
            +
            pythagoras(double a, + double b)
            +
             
            +
            void
            + +
            +
            When the timer (counter) goes down to 0, the bomb explode
            +
            +
            +
            +
            +
            +

            Methods inherited from class fr.lnl.game.server.games.grid.elements.Explosive

            +getPlayer, interact
            +
            +

            Methods inherited from class fr.lnl.game.server.games.grid.elements.AbstractBox

            +isLock, setLock
            +
            +

            Methods inherited from class java.lang.Object

            +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
            +
            +
          • +
          +
          +
          +
            + +
          • +
            +

            Field Details

            +
              +
            • +
              +

              game

              +
              private final Game game
              +
              +
            • +
            • +
              +

              counter

              +
              private int counter
              +
              Timer before explosion
              +
              +
            • +
            • +
              +

              EXPLOSION_SIZE

              +
              private static final int EXPLOSION_SIZE
              +
              Explosion size, size is circle, not square
              +
              +
              See Also:
              +
              + +
              +
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              Bomb

              +
              public Bomb(Point point, + Game game)
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              explode

              +
              protected void explode(Grid grid)
              +
              Description copied from class: Explosive
              +
              Apply damage to players and delete this object
              +
              +
              Overrides:
              +
              explode in class Explosive
              +
              Parameters:
              +
              grid - game's grid
              +
              +
              +
            • +
            • +
              +

              update

              +
              public void update()
              +
              When the timer (counter) goes down to 0, the bomb explode
              +
              +
              Specified by:
              +
              update in interface CountdownBox
              +
              See Also:
              +
              + +
              +
              +
              +
            • +
            • +
              +

              pythagoras

              +
              public double pythagoras(double a, + double b)
              +
              +
              Parameters:
              +
              a - adjacent side of a triangle
              +
              b - opposite side of a triangle
              +
              Returns:
              +
              Pythagoras' theorem value
              +
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/Box.html b/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/Box.html new file mode 100644 index 0000000..04e23d6 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/Box.html @@ -0,0 +1,147 @@ + + + + +Box (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Interface Box

          +
          +
          +
          +
          All Known Implementing Classes:
          +
          AbstractBox, Bomb, EnergyBall, Explosive, Mine, Wall
          +
          +
          +
          public interface Box
          +
          +
          +
            + +
          • +
            +

            Method Summary

            +
            +
            +
            +
            +
            Modifier and Type
            +
            Method
            +
            Description
            +
            boolean
            + +
             
            +
            void
            +
            setLock(boolean lock)
            +
             
            +
            +
            +
            +
            +
          • +
          +
          +
          +
            + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              isLock

              +
              boolean isLock()
              +
              +
              Returns:
              +
              true if this box is locked (can't place wall on this position)
              +
              See Also:
              +
              + +
              +
              +
              +
            • +
            • +
              +

              setLock

              +
              void setLock(boolean lock)
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/CountdownBox.html b/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/CountdownBox.html new file mode 100644 index 0000000..9263d13 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/CountdownBox.html @@ -0,0 +1,132 @@ + + + + +CountdownBox (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Interface CountdownBox

          +
          +
          +
          +
          All Known Implementing Classes:
          +
          Bomb
          +
          +
          +
          public interface CountdownBox
          +
          A box implemented by CountdownBox is a box which do an action a certain time after being placed
          +
          +
          +
            + +
          • +
            +

            Method Summary

            +
            +
            +
            +
            +
            Modifier and Type
            +
            Method
            +
            Description
            +
            void
            + +
            +
            Call at each game tick (After a player do an action)
            +
            +
            +
            +
            +
            +
          • +
          +
          +
          +
            + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              update

              +
              void update()
              +
              Call at each game tick (After a player do an action)
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/EnergyBall.html b/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/EnergyBall.html new file mode 100644 index 0000000..b67bcb7 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/EnergyBall.html @@ -0,0 +1,219 @@ + + + + +EnergyBall (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class EnergyBall

          +
          +
          java.lang.Object +
          fr.lnl.game.server.games.grid.elements.AbstractBox +
          fr.lnl.game.server.games.grid.elements.EnergyBall
          +
          +
          +
          +
          +
          All Implemented Interfaces:
          +
          Box, InteractiveBox
          +
          +
          +
          public class EnergyBall +extends AbstractBox +implements InteractiveBox
          +
          An EnergyBall is a box which give back a bit of player energy after it walks on the ball
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              EnergyBall

              +
              public EnergyBall()
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              interact

              +
              public void interact(Grid grid, + Player player, + Point position)
              +
              Increment energy of player who walks on this element
              +
              +
              Specified by:
              +
              interact in interface InteractiveBox
              +
              Parameters:
              +
              grid - Game's grid
              +
              player - the player who walks on this element
              +
              position - position of this element on the grid
              +
              See Also:
              +
              + +
              +
              +
              +
            • +
            • +
              +

              equals

              +
              public boolean equals(Object obj)
              +
              Used by tests
              +
              +
              Overrides:
              +
              equals in class Object
              +
              Parameters:
              +
              obj - the object to compare
              +
              Returns:
              +
              true if obj is an instance of EnergyBall, false otherwise
              +
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/Explosive.html b/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/Explosive.html new file mode 100644 index 0000000..a0eb6b8 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/Explosive.html @@ -0,0 +1,269 @@ + + + + +Explosive (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class Explosive

          +
          +
          java.lang.Object +
          fr.lnl.game.server.games.grid.elements.AbstractBox +
          fr.lnl.game.server.games.grid.elements.Explosive
          +
          +
          +
          +
          +
          All Implemented Interfaces:
          +
          Box, InteractiveBox
          +
          +
          +
          Direct Known Subclasses:
          +
          Bomb, Mine
          +
          +
          +
          public abstract class Explosive +extends AbstractBox +implements InteractiveBox
          +
          Super class of Bomb and Mine
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Field Details

            +
              +
            • +
              +

              point

              +
              protected final Point point
              +
              Position of the explosive
              +
              +
            • +
            • +
              +

              player

              +
              protected final Player player
              +
              Owner of the explosive
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              Explosive

              +
              public Explosive(Player player, + Point point)
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              interact

              +
              public void interact(Grid grid, + Player player, + Point position)
              +
              Decrement energy of the player who walks on this element
              +
              +
              Specified by:
              +
              interact in interface InteractiveBox
              +
              Parameters:
              +
              grid - Game's grid
              +
              player - the player who walks on this element
              +
              position - position of this element on the grid
              +
              See Also:
              +
              + +
              +
              +
              +
            • +
            • +
              +

              explode

              +
              protected void explode(Grid grid)
              +
              Apply damage to players and delete this object
              +
              +
              Parameters:
              +
              grid - game's grid
              +
              +
              +
            • +
            • +
              +

              getPlayer

              +
              public Player getPlayer()
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/InteractiveBox.html b/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/InteractiveBox.html new file mode 100644 index 0000000..236cf6c --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/InteractiveBox.html @@ -0,0 +1,142 @@ + + + + +InteractiveBox (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Interface InteractiveBox

          +
          +
          +
          +
          All Known Implementing Classes:
          +
          Bomb, EnergyBall, Explosive, Mine
          +
          +
          +
          public interface InteractiveBox
          +
          A box implemented by InteractiveBox is a box which do an action when someone walks on it
          +
          +
          +
            + +
          • +
            +

            Method Summary

            +
            +
            +
            +
            +
            Modifier and Type
            +
            Method
            +
            Description
            +
            void
            +
            interact(Grid grid, + Player player, + Point position)
            +
            +
            Call when a player walk on it
            +
            +
            +
            +
            +
            +
          • +
          +
          +
          +
            + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              interact

              +
              void interact(Grid grid, + Player player, + Point position)
              +
              Call when a player walk on it
              +
              +
              Parameters:
              +
              grid - Game's grid
              +
              player - the player who walks on this element
              +
              position - position of this element on the grid
              +
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/Mine.html b/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/Mine.html new file mode 100644 index 0000000..e6e5540 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/Mine.html @@ -0,0 +1,197 @@ + + + + +Mine (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class Mine

          +
          + +
          +
          +
          All Implemented Interfaces:
          +
          Box, InteractiveBox
          +
          +
          +
          public class Mine +extends Explosive
          +
          A mine is an element which explose when someone walks on it, the explosion area is on 1 case only
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              Mine

              +
              public Mine(Player player, + Point point)
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              explode

              +
              protected void explode(Grid grid)
              +
              Description copied from class: Explosive
              +
              Apply damage to players and delete this object
              +
              +
              Overrides:
              +
              explode in class Explosive
              +
              Parameters:
              +
              grid - game's grid
              +
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/Wall.html b/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/Wall.html new file mode 100644 index 0000000..8f086b4 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/Wall.html @@ -0,0 +1,188 @@ + + + + +Wall (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class Wall

          +
          +
          java.lang.Object +
          fr.lnl.game.server.games.grid.elements.AbstractBox +
          fr.lnl.game.server.games.grid.elements.Wall
          +
          +
          +
          +
          +
          All Implemented Interfaces:
          +
          Box
          +
          +
          +
          public class Wall +extends AbstractBox
          +
          A wall is an intraversable object
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              Wall

              +
              public Wall()
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              equals

              +
              public boolean equals(Object obj)
              +
              Used by tests
              +
              +
              Overrides:
              +
              equals in class Object
              +
              Parameters:
              +
              obj - the object to compare
              +
              Returns:
              +
              true if obj is an instance of wall, false otherwise
              +
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/package-summary.html b/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/package-summary.html new file mode 100644 index 0000000..3d16a61 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/package-summary.html @@ -0,0 +1,141 @@ + + + + +fr.lnl.game.server.games.grid.elements (server API) + + + + + + + + + + + + + + +
          + +
          +
          +
          +
          Module server
          +

          Package fr.lnl.game.server.games.grid.elements

          +
          +
          +
          package fr.lnl.game.server.games.grid.elements
          +
          +
          Package containing all the elements that can be arranged in a grid
          +
          +
          +
            +
          • + +
          • +
          • +
            +
            +
            +
            +
            Class
            +
            Description
            + +
            +
            AbstractBox is instantiable (not an abstract class), but when it's the case, instance doesn't represent anything, + it's only to see if there is a lock on this position or not
            +
            + +
            +
            Bomb are elements which explode when someone walks on it or after a countdown, the explosion area is on multiple cases
            +
            + +
             
            + +
            +
            A box implemented by CountdownBox is a box which do an action a certain time after being placed
            +
            + +
            +
            An EnergyBall is a box which give back a bit of player energy after it walks on the ball
            +
            + +
            +
            Super class of Bomb and Mine
            +
            + +
            +
            A box implemented by InteractiveBox is a box which do an action when someone walks on it
            +
            + +
            +
            A mine is an element which explose when someone walks on it, the explosion area is on 1 case only
            +
            + +
            +
            A wall is an intraversable object
            +
            +
            +
            +
            +
          • +
          +
          +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/package-tree.html b/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/package-tree.html new file mode 100644 index 0000000..82abfc4 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/grid/elements/package-tree.html @@ -0,0 +1,89 @@ + + + + +fr.lnl.game.server.games.grid.elements Class Hierarchy (server API) + + + + + + + + + + + + + + +
          + +
          +
          +
          +

          Hierarchy For Package fr.lnl.game.server.games.grid.elements

          +Package Hierarchies: + +
          +
          +

          Class Hierarchy

          +
            +
          • java.lang.Object +
              +
            • fr.lnl.game.server.games.grid.elements.AbstractBox (implements fr.lnl.game.server.games.grid.elements.Box) +
                +
              • fr.lnl.game.server.games.grid.elements.EnergyBall (implements fr.lnl.game.server.games.grid.elements.InteractiveBox)
              • +
              • fr.lnl.game.server.games.grid.elements.Explosive (implements fr.lnl.game.server.games.grid.elements.InteractiveBox) +
                  +
                • fr.lnl.game.server.games.grid.elements.Bomb (implements fr.lnl.game.server.games.grid.elements.CountdownBox)
                • +
                • fr.lnl.game.server.games.grid.elements.Mine
                • +
                +
              • +
              • fr.lnl.game.server.games.grid.elements.Wall
              • +
              +
            • +
            +
          • +
          +
          +
          +

          Interface Hierarchy

          +
            +
          • fr.lnl.game.server.games.grid.elements.Box
          • +
          • fr.lnl.game.server.games.grid.elements.CountdownBox
          • +
          • fr.lnl.game.server.games.grid.elements.InteractiveBox
          • +
          +
          +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/grid/package-summary.html b/livraison/doc/server/server/fr/lnl/game/server/games/grid/package-summary.html new file mode 100644 index 0000000..957ffa8 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/grid/package-summary.html @@ -0,0 +1,120 @@ + + + + +fr.lnl.game.server.games.grid (server API) + + + + + + + + + + + + + + +
          + +
          +
          +
          +
          Module server
          +

          Package fr.lnl.game.server.games.grid

          +
          +
          +
          package fr.lnl.game.server.games.grid
          +
          +
          Package containing all about Grid components
          +
          +
          + +
          +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/grid/package-tree.html b/livraison/doc/server/server/fr/lnl/game/server/games/grid/package-tree.html new file mode 100644 index 0000000..1d79eb3 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/grid/package-tree.html @@ -0,0 +1,70 @@ + + + + +fr.lnl.game.server.games.grid Class Hierarchy (server API) + + + + + + + + + + + + + + +
          + +
          +
          +
          +

          Hierarchy For Package fr.lnl.game.server.games.grid

          +Package Hierarchies: + +
          +
          +

          Class Hierarchy

          +
            +
          • java.lang.Object +
              +
            • fr.lnl.game.server.games.grid.Grid
            • +
            +
          • +
          +
          +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/package-summary.html b/livraison/doc/server/server/fr/lnl/game/server/games/package-summary.html new file mode 100644 index 0000000..38d096d --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/package-summary.html @@ -0,0 +1,123 @@ + + + + +fr.lnl.game.server.games (server API) + + + + + + + + + + + + + + +
          + +
          +
          +
          +
          Module server
          +

          Package fr.lnl.game.server.games

          +
          +
          +
          package fr.lnl.game.server.games
          +
          +
          Game package, contains all classes and sub-packages mainly related game works
          +
          +
          + +
          +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/package-tree.html b/livraison/doc/server/server/fr/lnl/game/server/games/package-tree.html new file mode 100644 index 0000000..a502127 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/package-tree.html @@ -0,0 +1,70 @@ + + + + +fr.lnl.game.server.games Class Hierarchy (server API) + + + + + + + + + + + + + + +
          + +
          +
          +
          +

          Hierarchy For Package fr.lnl.game.server.games

          +Package Hierarchies: + +
          +
          +

          Class Hierarchy

          +
            +
          • java.lang.Object +
              +
            • fr.lnl.game.server.games.Game
            • +
            +
          • +
          +
          +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/player/AbstractPlayer.html b/livraison/doc/server/server/fr/lnl/game/server/games/player/AbstractPlayer.html new file mode 100644 index 0000000..e5996ee --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/player/AbstractPlayer.html @@ -0,0 +1,474 @@ + + + + +AbstractPlayer (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class AbstractPlayer

          +
          +
          java.lang.Object +
          fr.lnl.game.server.games.player.AbstractPlayer
          +
          +
          +
          +
          All Implemented Interfaces:
          +
          Player
          +
          +
          +
          Direct Known Subclasses:
          +
          ComputerPlayer, HumanPlayer
          +
          +
          +
          public abstract class AbstractPlayer +extends Object +implements Player
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Field Details

            +
              +
            • +
              +

              id

              +
              private final int id
              +
              +
            • +
            • +
              +

              position

              +
              private Point position
              +
              +
            • +
            • +
              +

              energy

              +
              private int energy
              +
              +
            • +
            • +
              +

              weapon

              +
              private Weapon weapon
              +
              +
            • +
            • +
              +

              shieldDeploy

              +
              private boolean shieldDeploy
              +
              +
            • +
            • +
              +

              actions

              +
              private List<Action> actions
              +
              +
            • +
            • +
              +

              classPlayer

              +
              private final ClassPlayer classPlayer
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              AbstractPlayer

              +
              public AbstractPlayer(Integer id, + Point position, + boolean shieldDeploy, + ClassPlayer classPlayer)
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              generateAvailableActions

              +
              public List<ReunionSameAction> generateAvailableActions()
              +
              +
              Specified by:
              +
              generateAvailableActions in interface Player
              +
              Returns:
              +
              a list of ReunionSameAction which groups the same types of actions together. + It is used by the player action choice strategy
              +
              +
              +
            • +
            • +
              +

              isAlive

              +
              public boolean isAlive()
              +
              +
              Specified by:
              +
              isAlive in interface Player
              +
              Returns:
              +
              true if this player is Alive, false otherwise
              +
              +
              +
            • +
            • +
              +

              getId

              +
              public int getId()
              +
              +
              Specified by:
              +
              getId in interface Player
              +
              +
              +
            • +
            • +
              +

              getEnergy

              +
              public int getEnergy()
              +
              +
              Specified by:
              +
              getEnergy in interface Player
              +
              +
              +
            • +
            • +
              +

              getWeapon

              +
              public Weapon getWeapon()
              +
              +
              Specified by:
              +
              getWeapon in interface Player
              +
              +
              +
            • +
            • +
              +

              isShieldDeploy

              +
              public boolean isShieldDeploy()
              +
              +
              Specified by:
              +
              isShieldDeploy in interface Player
              +
              Returns:
              +
              true if this player has his shield activated, false otherwise
              +
              +
              +
            • +
            • +
              +

              setEnergy

              +
              public void setEnergy(int energy)
              +
              +
              Specified by:
              +
              setEnergy in interface Player
              +
              +
              +
            • +
            • +
              +

              setShieldDeploy

              +
              public void setShieldDeploy(boolean shieldDeploy)
              +
              +
              Specified by:
              +
              setShieldDeploy in interface Player
              +
              +
              +
            • +
            • +
              +

              setWeapon

              +
              public void setWeapon(Weapon weapon)
              +
              +
              Specified by:
              +
              setWeapon in interface Player
              +
              +
              +
            • +
            • +
              +

              getActions

              +
              public List<Action> getActions()
              +
              +
              Specified by:
              +
              getActions in interface Player
              +
              +
              +
            • +
            • +
              +

              setActions

              +
              public void setActions(List<Action> actions)
              +
              +
              Specified by:
              +
              setActions in interface Player
              +
              +
              +
            • +
            • +
              +

              getClassPlayer

              +
              public ClassPlayer getClassPlayer()
              +
              +
              Specified by:
              +
              getClassPlayer in interface Player
              +
              +
              +
            • +
            • +
              +

              getPosition

              +
              public Point getPosition()
              +
              +
              Specified by:
              +
              getPosition in interface Player
              +
              +
              +
            • +
            • +
              +

              setPosition

              +
              public void setPosition(Point position)
              +
              +
              Specified by:
              +
              setPosition in interface Player
              +
              +
              +
            • +
            • +
              +

              decrementEnergy

              +
              public void decrementEnergy(int energy)
              +
              Description copied from interface: Player
              +
              Call by the implementing classes Action to withdraw + a certain number of energy from a player
              +
              +
              Specified by:
              +
              decrementEnergy in interface Player
              +
              +
              +
            • +
            • +
              +

              incrementEnergy

              +
              public void incrementEnergy(int energy)
              +
              Description copied from interface: Player
              +
              Call by the implementing classes Action to add + a certain number of energy from a player
              +
              +
              Specified by:
              +
              incrementEnergy in interface Player
              +
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/player/ClassPlayer.html b/livraison/doc/server/server/fr/lnl/game/server/games/player/ClassPlayer.html new file mode 100644 index 0000000..f73fa75 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/player/ClassPlayer.html @@ -0,0 +1,501 @@ + + + + +ClassPlayer (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Enum Class ClassPlayer

          +
          +
          java.lang.Object +
          java.lang.Enum<ClassPlayer> +
          fr.lnl.game.server.games.player.ClassPlayer
          +
          +
          +
          +
          +
          All Implemented Interfaces:
          +
          Serializable, Comparable<ClassPlayer>, Constable
          +
          +
          +
          public enum ClassPlayer +extends Enum<ClassPlayer>
          +
          ClassPlayer contains all data about the cost of an action or the cost of a damage
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Enum Constant Details

            +
              +
            • +
              +

              DEFAULT

              +
              public static final ClassPlayer DEFAULT
              +
              +
            • +
            • +
              +

              TANK

              +
              public static final ClassPlayer TANK
              +
              +
            • +
            • +
              +

              DPS

              +
              public static final ClassPlayer DPS
              +
              +
            • +
            • +
              +

              SUPPORT

              +
              public static final ClassPlayer SUPPORT
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Field Details

            +
              +
            • +
              +

              energy

              +
              private final int energy
              +
              +
            • +
            • +
              +

              shieldCost

              +
              private final int shieldCost
              +
              +
            • +
            • +
              +

              shootCost

              +
              private final int shootCost
              +
              +
            • +
            • +
              +

              mineCost

              +
              private final int mineCost
              +
              +
            • +
            • +
              +

              bombCost

              +
              private final int bombCost
              +
              +
            • +
            • +
              +

              moveCost

              +
              private final int moveCost
              +
              +
            • +
            • +
              +

              gainEnergy

              +
              private final int gainEnergy
              +
              +
            • +
            • +
              +

              penaltyShoot

              +
              private final int penaltyShoot
              +
              +
            • +
            • +
              +

              penaltyBomb

              +
              private final int penaltyBomb
              +
              +
            • +
            • +
              +

              penaltyMine

              +
              private final int penaltyMine
              +
              +
            • +
            • +
              +

              weapon

              +
              private final Weapon weapon
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              ClassPlayer

              +
              private ClassPlayer(int energy, + int shieldCost, + int shootCost, + int mineCost, + int bombCost, + int moveCost, + int gainEnergy, + int penaltyShoot, + int penaltyBomb, + int penaltyMine, + Weapon weapon)
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              values

              +
              public static ClassPlayer[] values()
              +
              Returns an array containing the constants of this enum class, in +the order they are declared.
              +
              +
              Returns:
              +
              an array containing the constants of this enum class, in the order they are declared
              +
              +
              +
            • +
            • +
              +

              valueOf

              +
              public static ClassPlayer valueOf(String name)
              +
              Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
              +
              +
              Parameters:
              +
              name - the name of the enum constant to be returned.
              +
              Returns:
              +
              the enum constant with the specified name
              +
              Throws:
              +
              IllegalArgumentException - if this enum class has no constant with the specified name
              +
              NullPointerException - if the argument is null
              +
              +
              +
            • +
            • +
              +

              getEnergy

              +
              public int getEnergy()
              +
              +
            • +
            • +
              +

              getShieldCost

              +
              public int getShieldCost()
              +
              +
            • +
            • +
              +

              getShootCost

              +
              public int getShootCost()
              +
              +
            • +
            • +
              +

              getMineCost

              +
              public int getMineCost()
              +
              +
            • +
            • +
              +

              getBombCost

              +
              public int getBombCost()
              +
              +
            • +
            • +
              +

              getMoveCost

              +
              public int getMoveCost()
              +
              +
            • +
            • +
              +

              getGainEnergy

              +
              public int getGainEnergy()
              +
              +
            • +
            • +
              +

              getPenaltyShoot

              +
              public int getPenaltyShoot()
              +
              +
            • +
            • +
              +

              getPenaltyBomb

              +
              public int getPenaltyBomb()
              +
              +
            • +
            • +
              +

              getPenaltyMine

              +
              public int getPenaltyMine()
              +
              +
            • +
            • +
              +

              getWeapon

              +
              public Weapon getWeapon()
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/player/ComputerPlayer.html b/livraison/doc/server/server/fr/lnl/game/server/games/player/ComputerPlayer.html new file mode 100644 index 0000000..cf98623 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/player/ComputerPlayer.html @@ -0,0 +1,199 @@ + + + + +ComputerPlayer (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class ComputerPlayer

          +
          +
          java.lang.Object +
          fr.lnl.game.server.games.player.AbstractPlayer +
          fr.lnl.game.server.games.player.ComputerPlayer
          +
          +
          +
          +
          +
          All Implemented Interfaces:
          +
          Player
          +
          +
          +
          Direct Known Subclasses:
          +
          RandomComputerPlayer, StrategyComputerPlayer
          +
          +
          +
          public abstract class ComputerPlayer +extends AbstractPlayer
          +
          Super class of all Computer players
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Constructor Details

            + +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              choseAction

              +
              public Action choseAction(Game game)
              +
              Call when an AI need to choose an action to execute
              +
              +
              Returns:
              +
              the chosen action
              +
              +
              +
            • +
            • +
              +

              strategy

              +
              public abstract Action strategy(Game game)
              +
              Method belonging to classes which extend this class to define the specific strategy of the player
              +
              +
              Returns:
              +
              the chosen action between all available
              +
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/player/HumanPlayer.html b/livraison/doc/server/server/fr/lnl/game/server/games/player/HumanPlayer.html new file mode 100644 index 0000000..29aaa97 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/player/HumanPlayer.html @@ -0,0 +1,178 @@ + + + + +HumanPlayer (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class HumanPlayer

          +
          +
          java.lang.Object +
          fr.lnl.game.server.games.player.AbstractPlayer +
          fr.lnl.game.server.games.player.HumanPlayer
          +
          +
          +
          +
          +
          All Implemented Interfaces:
          +
          Player
          +
          +
          +
          public class HumanPlayer +extends AbstractPlayer
          +
          Instance of Human Player.
          + A human player choose an action to execute by using mouse or keyboard.
          + Human Player don't implement choseAction cause this method is executed on client part
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Constructor Details

            + +
            +
          • + +
          • +
            +

            Method Details

            + +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/player/Player.html b/livraison/doc/server/server/fr/lnl/game/server/games/player/Player.html new file mode 100644 index 0000000..3ce4783 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/player/Player.html @@ -0,0 +1,281 @@ + + + + +Player (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Interface Player

          +
          +
          +
          +
          All Known Implementing Classes:
          +
          AbstractPlayer, ComputerPlayer, HumanPlayer, RandomComputerPlayer, StrategyComputerPlayer
          +
          +
          +
          public interface Player
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              generateAvailableActions

              +
              List<ReunionSameAction> generateAvailableActions()
              +
              +
            • +
            • +
              +

              getPosition

              +
              Point getPosition()
              +
              +
            • +
            • +
              +

              isAlive

              +
              boolean isAlive()
              +
              +
              Returns:
              +
              true if this player is Alive, false otherwise
              +
              +
              +
            • +
            • +
              +

              getId

              +
              int getId()
              +
              +
            • +
            • +
              +

              getEnergy

              +
              int getEnergy()
              +
              +
            • +
            • +
              +

              getWeapon

              +
              Weapon getWeapon()
              +
              +
            • +
            • +
              +

              isShieldDeploy

              +
              boolean isShieldDeploy()
              +
              +
              Returns:
              +
              true if this player has his shield activated, false otherwise
              +
              +
              +
            • +
            • +
              +

              setEnergy

              +
              void setEnergy(int energy)
              +
              +
            • +
            • +
              +

              setShieldDeploy

              +
              void setShieldDeploy(boolean shieldDeploy)
              +
              +
            • +
            • +
              +

              setWeapon

              +
              void setWeapon(Weapon weapon)
              +
              +
            • +
            • +
              +

              getActions

              +
              List<Action> getActions()
              +
              +
            • +
            • +
              +

              setActions

              +
              void setActions(List<Action> actions)
              +
              +
            • +
            • +
              +

              getClassPlayer

              +
              ClassPlayer getClassPlayer()
              +
              +
            • +
            • +
              +

              setPosition

              +
              void setPosition(Point position)
              +
              +
            • +
            • +
              +

              decrementEnergy

              +
              void decrementEnergy(int energy)
              +
              Call by the implementing classes Action to withdraw + a certain number of energy from a player
              +
              +
            • +
            • +
              +

              incrementEnergy

              +
              void incrementEnergy(int energy)
              +
              Call by the implementing classes Action to add + a certain number of energy from a player
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/player/RandomComputerPlayer.html b/livraison/doc/server/server/fr/lnl/game/server/games/player/RandomComputerPlayer.html new file mode 100644 index 0000000..b413ed8 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/player/RandomComputerPlayer.html @@ -0,0 +1,198 @@ + + + + +RandomComputerPlayer (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class RandomComputerPlayer

          +
          + +
          +
          +
          All Implemented Interfaces:
          +
          Player
          +
          +
          +
          public class RandomComputerPlayer +extends ComputerPlayer
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              RandomComputerPlayer

              +
              public RandomComputerPlayer(Integer id, + Point point, + ClassPlayer classPlayer)
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              strategy

              +
              public Action strategy(Game game)
              +
              Choose an action fully randomly
              +
              +
              Specified by:
              +
              strategy in class ComputerPlayer
              +
              Returns:
              +
              an action between all available
              +
              +
              +
            • +
            • +
              +

              toString

              +
              public String toString()
              +
              +
              Overrides:
              +
              toString in class Object
              +
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/player/StrategyComputerPlayer.html b/livraison/doc/server/server/fr/lnl/game/server/games/player/StrategyComputerPlayer.html new file mode 100644 index 0000000..309f378 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/player/StrategyComputerPlayer.html @@ -0,0 +1,260 @@ + + + + +StrategyComputerPlayer (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class StrategyComputerPlayer

          +
          + +
          +
          +
          All Implemented Interfaces:
          +
          Player
          +
          +
          +
          public class StrategyComputerPlayer +extends ComputerPlayer
          +
          +
          + +
          +
          + +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/player/package-summary.html b/livraison/doc/server/server/fr/lnl/game/server/games/player/package-summary.html new file mode 100644 index 0000000..009acd8 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/player/package-summary.html @@ -0,0 +1,136 @@ + + + + +fr.lnl.game.server.games.player (server API) + + + + + + + + + + + + + + +
          + +
          +
          +
          +
          Module server
          +

          Package fr.lnl.game.server.games.player

          +
          +
          +
          package fr.lnl.game.server.games.player
          +
          +
          Package storing all players classes and as well AI behavior
          +
          +
          + +
          +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/player/package-tree.html b/livraison/doc/server/server/fr/lnl/game/server/games/player/package-tree.html new file mode 100644 index 0000000..1f5ced4 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/player/package-tree.html @@ -0,0 +1,100 @@ + + + + +fr.lnl.game.server.games.player Class Hierarchy (server API) + + + + + + + + + + + + + + +
          + +
          +
          +
          +

          Hierarchy For Package fr.lnl.game.server.games.player

          +Package Hierarchies: + +
          +
          +

          Class Hierarchy

          + +
          +
          +

          Interface Hierarchy

          +
            +
          • fr.lnl.game.server.games.player.Player
          • +
          +
          +
          +

          Enum Class Hierarchy

          + +
          +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/weapon/Firearm.html b/livraison/doc/server/server/fr/lnl/game/server/games/weapon/Firearm.html new file mode 100644 index 0000000..11e5c02 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/weapon/Firearm.html @@ -0,0 +1,244 @@ + + + + +Firearm (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class Firearm

          +
          +
          java.lang.Object +
          fr.lnl.game.server.games.weapon.Firearm
          +
          +
          +
          +
          All Implemented Interfaces:
          +
          Weapon
          +
          +
          +
          public class Firearm +extends Object +implements Weapon
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Field Details

            +
              +
            • +
              +

              bullet

              +
              int bullet
              +
              +
            • +
            • +
              +

              horizontalDistance

              +
              int horizontalDistance
              +
              +
            • +
            • +
              +

              verticalDistance

              +
              int verticalDistance
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              Firearm

              +
              public Firearm()
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              getBullet

              +
              public int getBullet()
              +
              +
              Specified by:
              +
              getBullet in interface Weapon
              +
              +
              +
            • +
            • +
              +

              getHorizontalDistance

              +
              public int getHorizontalDistance()
              +
              +
              Specified by:
              +
              getHorizontalDistance in interface Weapon
              +
              Returns:
              +
              distance a bullet can go horizontally
              +
              +
              +
            • +
            • +
              +

              getVerticalDistance

              +
              public int getVerticalDistance()
              +
              +
              Specified by:
              +
              getVerticalDistance in interface Weapon
              +
              Returns:
              +
              distance a bullet can go vertically
              +
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/weapon/Weapon.html b/livraison/doc/server/server/fr/lnl/game/server/games/weapon/Weapon.html new file mode 100644 index 0000000..decc57f --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/weapon/Weapon.html @@ -0,0 +1,154 @@ + + + + +Weapon (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Interface Weapon

          +
          +
          +
          +
          All Known Implementing Classes:
          +
          Firearm
          +
          +
          +
          public interface Weapon
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              getBullet

              +
              int getBullet()
              +
              +
            • +
            • +
              +

              getHorizontalDistance

              +
              int getHorizontalDistance()
              +
              +
              Returns:
              +
              distance a bullet can go horizontally
              +
              +
              +
            • +
            • +
              +

              getVerticalDistance

              +
              int getVerticalDistance()
              +
              +
              Returns:
              +
              distance a bullet can go vertically
              +
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/weapon/package-summary.html b/livraison/doc/server/server/fr/lnl/game/server/games/weapon/package-summary.html new file mode 100644 index 0000000..06be303 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/weapon/package-summary.html @@ -0,0 +1,118 @@ + + + + +fr.lnl.game.server.games.weapon (server API) + + + + + + + + + + + + + + +
          + +
          +
          +
          +
          Module server
          +

          Package fr.lnl.game.server.games.weapon

          +
          +
          +
          package fr.lnl.game.server.games.weapon
          +
          +
          Package containing all bout player's weapons
          +
          +
          + +
          +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/games/weapon/package-tree.html b/livraison/doc/server/server/fr/lnl/game/server/games/weapon/package-tree.html new file mode 100644 index 0000000..8f334ce --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/games/weapon/package-tree.html @@ -0,0 +1,76 @@ + + + + +fr.lnl.game.server.games.weapon Class Hierarchy (server API) + + + + + + + + + + + + + + +
          + +
          +
          +
          +

          Hierarchy For Package fr.lnl.game.server.games.weapon

          +Package Hierarchies: + +
          +
          +

          Class Hierarchy

          +
            +
          • java.lang.Object +
              +
            • fr.lnl.game.server.games.weapon.Firearm (implements fr.lnl.game.server.games.weapon.Weapon)
            • +
            +
          • +
          +
          +
          +

          Interface Hierarchy

          +
            +
          • fr.lnl.game.server.games.weapon.Weapon
          • +
          +
          +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/listener/AbstractModelListening.html b/livraison/doc/server/server/fr/lnl/game/server/listener/AbstractModelListening.html new file mode 100644 index 0000000..0c62c9c --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/listener/AbstractModelListening.html @@ -0,0 +1,213 @@ + + + + +AbstractModelListening (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class AbstractModelListening

          +
          +
          java.lang.Object +
          fr.lnl.game.server.listener.AbstractModelListening
          +
          +
          +
          +
          All Implemented Interfaces:
          +
          ModelListener
          +
          +
          +
          public abstract class AbstractModelListening +extends Object +implements ModelListener
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Field Details

            + +
            +
          • + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              AbstractModelListening

              +
              public AbstractModelListening()
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              addListener

              +
              public void addListener(ModelListener e)
              +
              +
            • +
            • +
              +

              removalListener

              +
              public void removalListener(ModelListener e)
              +
              +
            • +
            • +
              +

              fireChange

              +
              public void fireChange()
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/listener/ModelListener.html b/livraison/doc/server/server/fr/lnl/game/server/listener/ModelListener.html new file mode 100644 index 0000000..10a44a4 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/listener/ModelListener.html @@ -0,0 +1,136 @@ + + + + +ModelListener (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Interface ModelListener

          +
          +
          +
          +
          All Known Implementing Classes:
          +
          AbstractModelListening
          +
          +
          +
          public interface ModelListener
          +
          Model implemented by AbstractModelListening
          +
          +
          +
            + +
          • +
            +

            Method Summary

            +
            +
            +
            +
            +
            Modifier and Type
            +
            Method
            +
            Description
            +
            void
            + +
            +
            this method is call everytime, an action on the view forces a controller to sens an update to model
            +
            +
            +
            +
            +
            +
          • +
          +
          +
          +
            + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              updateModel

              +
              void updateModel(Object obj)
              +
              this method is call everytime, an action on the view forces a controller to sens an update to model
              +
              +
              Parameters:
              +
              obj - can be used to send data to model
              +
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/listener/package-summary.html b/livraison/doc/server/server/fr/lnl/game/server/listener/package-summary.html new file mode 100644 index 0000000..e97ff9a --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/listener/package-summary.html @@ -0,0 +1,117 @@ + + + + +fr.lnl.game.server.listener (server API) + + + + + + + + + + + + + + +
          + +
          +
          +
          +
          Module server
          +

          Package fr.lnl.game.server.listener

          +
          +
          +
          package fr.lnl.game.server.listener
          +
          +
          Package containing model of listener to implement + Used by listeners in client module
          +
          +
          + +
          +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/listener/package-tree.html b/livraison/doc/server/server/fr/lnl/game/server/listener/package-tree.html new file mode 100644 index 0000000..aa01660 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/listener/package-tree.html @@ -0,0 +1,76 @@ + + + + +fr.lnl.game.server.listener Class Hierarchy (server API) + + + + + + + + + + + + + + +
          + +
          +
          +
          +

          Hierarchy For Package fr.lnl.game.server.listener

          +Package Hierarchies: + +
          +
          +

          Class Hierarchy

          + +
          +
          +

          Interface Hierarchy

          + +
          +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/package-summary.html b/livraison/doc/server/server/fr/lnl/game/server/package-summary.html new file mode 100644 index 0000000..d72a8e5 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/package-summary.html @@ -0,0 +1,107 @@ + + + + +fr.lnl.game.server (server API) + + + + + + + + + + + + + + +
          + +
          +
          +
          +
          Module server
          +

          Package fr.lnl.game.server

          +
          +
          +
          package fr.lnl.game.server
          +
          +
          Server package
          +
          +
          + +
          +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/package-tree.html b/livraison/doc/server/server/fr/lnl/game/server/package-tree.html new file mode 100644 index 0000000..7f12a5a --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/package-tree.html @@ -0,0 +1,70 @@ + + + + +fr.lnl.game.server Class Hierarchy (server API) + + + + + + + + + + + + + + +
          + +
          +
          +
          +

          Hierarchy For Package fr.lnl.game.server

          +Package Hierarchies: + +
          +
          +

          Class Hierarchy

          + +
          +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/utils/CrashException.html b/livraison/doc/server/server/fr/lnl/game/server/utils/CrashException.html new file mode 100644 index 0000000..8ce53c4 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/utils/CrashException.html @@ -0,0 +1,151 @@ + + + + +CrashException (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class CrashException

          +
          +
          java.lang.Object +
          java.lang.Throwable +
          java.lang.Exception +
          java.lang.RuntimeException +
          fr.lnl.game.server.utils.CrashException
          +
          +
          +
          +
          +
          +
          +
          All Implemented Interfaces:
          +
          Serializable
          +
          +
          +
          public class CrashException +extends RuntimeException
          +
          Represent an unrecoverable error in the program, force program to stop
          +
          +
          See Also:
          +
          + +
          +
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              CrashException

              +
              public CrashException(String message, + Throwable cause)
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/utils/ErrorMessage.html b/livraison/doc/server/server/fr/lnl/game/server/utils/ErrorMessage.html new file mode 100644 index 0000000..7503a4f --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/utils/ErrorMessage.html @@ -0,0 +1,170 @@ + + + + +ErrorMessage (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class ErrorMessage

          +
          +
          java.lang.Object +
          fr.lnl.game.server.utils.ErrorMessage
          +
          +
          +
          +
          public class ErrorMessage +extends Object
          +
          Contain everything related to error messages, theirs errors are the fault of the end-user (like we demand an integer + and user give us a floating point number + Theirs error doesn't cause the program to stop, it'll demand a correct value
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Field Details

            +
              +
            • +
              +

              Entry_Error_Message

              +
              public static final String Entry_Error_Message
              +
              Error given to end-user when it give us a non integer or float value
              +
              +
              See Also:
              +
              + +
              +
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              ErrorMessage

              +
              public ErrorMessage()
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/utils/Maths.html b/livraison/doc/server/server/fr/lnl/game/server/utils/Maths.html new file mode 100644 index 0000000..08de152 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/utils/Maths.html @@ -0,0 +1,233 @@ + + + + +Maths (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class Maths

          +
          +
          java.lang.Object +
          fr.lnl.game.server.utils.Maths
          +
          +
          +
          +
          public class Maths +extends Object
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              Maths

              +
              public Maths()
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              testInteger

              +
              public static int testInteger(String entry, + Scanner scanner, + String error)
              +
              Convert entry to an integer
              +
              +
              Parameters:
              +
              entry - given parameter
              +
              scanner - standard input, used if entry isn't correct
              +
              error - error message to display if entry isn't an Integer
              +
              Returns:
              +
              an Integer if entry is valid or when it'll valid
              +
              +
              +
            • +
            • +
              +

              testFloat

              +
              public static float testFloat(String entry, + Scanner scanner, + String error)
              +
              Convert entry to a float
              +
              +
              Parameters:
              +
              entry - given parameter
              +
              scanner - standard input, used if entry isn't correct
              +
              error - error message to display if entry isn't a float
              +
              Returns:
              +
              a float if entry is a valid or when it'll valid
              +
              +
              +
            • +
            • +
              +

              isFloat

              +
              public static boolean isFloat(String strNum)
              +
              +
              Parameters:
              +
              strNum - entry
              +
              Returns:
              +
              true if strNum is a float, false otherwise
              +
              See Also:
              +
              + +
              +
              +
              +
            • +
            • +
              +

              isInteger

              +
              public static boolean isInteger(String strNum)
              +
              +
              Parameters:
              +
              strNum - entry
              +
              Returns:
              +
              true if strNum is an Integer, false otherwise
              +
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/utils/Pair.html b/livraison/doc/server/server/fr/lnl/game/server/utils/Pair.html new file mode 100644 index 0000000..7d7cb93 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/utils/Pair.html @@ -0,0 +1,280 @@ + + + + +Pair (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class Pair<A,B>

          +
          +
          java.lang.Object +
          fr.lnl.game.server.utils.Pair<A,B>
          +
          +
          +
          +
          Type Parameters:
          +
          A - first element of the tuple
          +
          B - second element of the tuple
          +
          +
          +
          Direct Known Subclasses:
          +
          Point
          +
          +
          +
          public class Pair<A,B> +extends Object
          +
          Tuple associating storing two value of undefined type.
          + Unlike Python, value in this Tuple can be modified (but the type of its new value need to be the same)
          +
          +
          +
            + +
          • +
            +

            Field Summary

            +
            Fields
            +
            +
            Modifier and Type
            +
            Field
            +
            Description
            +
            private A
            + +
             
            +
            private B
            + +
             
            +
            +
            +
          • + +
          • +
            +

            Constructor Summary

            +
            Constructors
            +
            +
            Constructor
            +
            Description
            +
            Pair(A a, + B b)
            +
             
            +
            +
            +
          • + +
          • +
            +

            Method Summary

            +
            +
            +
            +
            +
            Modifier and Type
            +
            Method
            +
            Description
            +
            boolean
            + +
             
            + + +
             
            + + +
             
            +
            int
            + +
            +
            Absolut useful when using HashMap or HashSet (or everything using hashCode to compare Objects
            +
            +
            void
            +
            setA(A a)
            +
             
            +
            void
            +
            setB(B b)
            +
             
            + + +
             
            +
            +
            +
            +
            +

            Methods inherited from class java.lang.Object

            +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
            +
            +
          • +
          +
          +
          +
            + +
          • +
            +

            Field Details

            +
              +
            • +
              +

              a

              +
              private A a
              +
              +
            • +
            • +
              +

              b

              +
              private B b
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              Pair

              +
              public Pair(A a, + B b)
              +
              +
            • +
            +
            +
          • + +
          • +
            +

            Method Details

            +
              +
            • +
              +

              getA

              +
              public A getA()
              +
              +
            • +
            • +
              +

              getB

              +
              public B getB()
              +
              +
            • +
            • +
              +

              setA

              +
              public void setA(A a)
              +
              +
            • +
            • +
              +

              setB

              +
              public void setB(B b)
              +
              +
            • +
            • +
              +

              equals

              +
              public boolean equals(Object o)
              +
              +
              Overrides:
              +
              equals in class Object
              +
              +
              +
            • +
            • +
              +

              hashCode

              +
              public int hashCode()
              +
              Absolut useful when using HashMap or HashSet (or everything using hashCode to compare Objects
              +
              +
              Overrides:
              +
              hashCode in class Object
              +
              Returns:
              +
              object hash
              +
              +
              +
            • +
            • +
              +

              toString

              +
              public String toString()
              +
              +
              Overrides:
              +
              toString in class Object
              +
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/utils/Point.html b/livraison/doc/server/server/fr/lnl/game/server/utils/Point.html new file mode 100644 index 0000000..927c501 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/utils/Point.html @@ -0,0 +1,135 @@ + + + + +Point (server API) + + + + + + + + + + + + + + +
          + +
          +
          + +
          +
          Module server
          + +

          Class Point

          +
          +
          java.lang.Object +
          fr.lnl.game.server.utils.Pair<Integer,Integer> +
          fr.lnl.game.server.utils.Point
          +
          +
          +
          +
          +
          public class Point +extends Pair<Integer,Integer>
          +
          Point extends from Pair, basically a simpler ways to use Pair when using grid position
          +
          +
          + +
          +
          +
            + +
          • +
            +

            Constructor Details

            +
              +
            • +
              +

              Point

              +
              public Point(int a, + int b)
              +
              +
            • +
            +
            +
          • +
          +
          + +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/utils/package-summary.html b/livraison/doc/server/server/fr/lnl/game/server/utils/package-summary.html new file mode 100644 index 0000000..586c033 --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/utils/package-summary.html @@ -0,0 +1,132 @@ + + + + +fr.lnl.game.server.utils (server API) + + + + + + + + + + + + + + +
          + +
          +
          +
          +
          Module server
          +

          Package fr.lnl.game.server.utils

          +
          +
          +
          package fr.lnl.game.server.utils
          +
          +
          Package containing all utility classes
          +
          +
          +
            +
          • + +
          • +
          • +
            +
            +
            +
            +
            Class
            +
            Description
            + +
            +
            Represent an unrecoverable error in the program, force program to stop
            +
            + +
            +
            Contain everything related to error messages, theirs errors are the fault of the end-user (like we demand an integer + and user give us a floating point number + Theirs error doesn't cause the program to stop, it'll demand a correct value
            +
            + +
             
            +
            Pair<A,B>
            +
            +
            Tuple associating storing two value of undefined type.
            + Unlike Python, value in this Tuple can be modified (but the type of its new value need to be the same)
            +
            + +
            +
            Point extends from Pair, basically a simpler ways to use Pair when using grid position
            +
            +
            +
            +
            +
          • +
          +
          +
          +
          +
          + + diff --git a/livraison/doc/server/server/fr/lnl/game/server/utils/package-tree.html b/livraison/doc/server/server/fr/lnl/game/server/utils/package-tree.html new file mode 100644 index 0000000..939386a --- /dev/null +++ b/livraison/doc/server/server/fr/lnl/game/server/utils/package-tree.html @@ -0,0 +1,89 @@ + + + + +fr.lnl.game.server.utils Class Hierarchy (server API) + + + + + + + + + + + + + + +
          + +
          +
          +
          +

          Hierarchy For Package fr.lnl.game.server.utils

          +Package Hierarchies: + +
          +
          +

          Class Hierarchy

          + +
          +
          +
          +
          + + diff --git a/livraison/doc/server/server/module-summary.html b/livraison/doc/server/server/module-summary.html new file mode 100644 index 0000000..160dd14 --- /dev/null +++ b/livraison/doc/server/server/module-summary.html @@ -0,0 +1,151 @@ + + + + +server (server API) + + + + + + + + + + + + + + +
          + +
          +
          +
          +

          Module server

          +
          +
          +
          module server
          +
          + +
          Server module, include every model classes
          +
          +
          + +
          +
          +
          +
          + + diff --git a/livraison/doc/server/stylesheet.css b/livraison/doc/server/stylesheet.css new file mode 100644 index 0000000..836c62d --- /dev/null +++ b/livraison/doc/server/stylesheet.css @@ -0,0 +1,865 @@ +/* + * Javadoc style sheet + */ + +@import url('resources/fonts/dejavu.css'); + +/* + * Styles for individual HTML elements. + * + * These are styles that are specific to individual HTML elements. Changing them affects the style of a particular + * HTML element throughout the page. + */ + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; + padding:0; + height:100%; + width:100%; +} +iframe { + margin:0; + padding:0; + height:100%; + width:100%; + overflow-y:scroll; + border:none; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a[href]:hover, a[href]:focus { + text-decoration:none; + color:#bb7a2a; +} +a[name] { + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; +} +h4 { + font-size:15px; +} +h5 { + font-size:14px; +} +h6 { + font-size:13px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; +} +:not(h1, h2, h3, h4, h5, h6) > code, +:not(h1, h2, h3, h4, h5, h6) > tt { + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +.summary-table dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +button { + font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size: 14px; +} +/* + * Styles for HTML generated by javadoc. + * + * These are style classes that are used by the standard doclet to generate HTML documentation. + */ + +/* + * Styles for document title and copyright. + */ +.clear { + clear:both; + height:0; + overflow:hidden; +} +.about-language { + float:right; + padding:0 21px 8px 8px; + font-size:11px; + margin-top:-9px; + height:2.9em; +} +.legal-copy { + margin-left:.5em; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* + * Styles for navigation bar. + */ +@media screen { + .flex-box { + position:fixed; + display:flex; + flex-direction:column; + height: 100%; + width: 100%; + } + .flex-header { + flex: 0 0 auto; + } + .flex-content { + flex: 1 1 auto; + overflow-y: auto; + } +} +.top-nav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + min-height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.sub-nav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.sub-nav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +.sub-nav .nav-list { + padding-top:5px; +} +ul.nav-list { + display:block; + margin:0 25px 0 0; + padding:0; +} +ul.sub-nav-list { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.nav-list li { + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +.sub-nav .nav-list-search { + float:right; + margin:0 0 0 0; + padding:5px 6px; + clear:none; +} +.nav-list-search label { + position:relative; + right:-16px; +} +ul.sub-nav-list li { + list-style:none; + float:left; + padding-top:10px; +} +.top-nav a:link, .top-nav a:active, .top-nav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.top-nav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.nav-bar-cell1-rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skip-nav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* + * Hide navigation links and search box in print layout + */ +@media print { + ul.nav-list, div.sub-nav { + display:none; + } +} +/* + * Styles for page header and footer. + */ +.title { + color:#2c4557; + margin:10px 0; +} +.sub-title { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* + * Styles for headings. + */ +body.class-declaration-page .summary h2, +body.class-declaration-page .details h2, +body.class-use-page h2, +body.module-declaration-page .block-list h2 { + font-style: italic; + padding:0; + margin:15px 0; +} +body.class-declaration-page .summary h3, +body.class-declaration-page .details h3, +body.class-declaration-page .summary .inherited-list h2 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +/* + * Styles for page layout containers. + */ +main { + clear:both; + padding:10px 20px; + position:relative; +} +dl.notes > dt { + font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +dl.notes > dd { + margin:5px 10px 10px 0; + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +dl.name-value > dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +dl.name-value > dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* + * Styles for lists. + */ +li.circle { + list-style:circle; +} +ul.horizontal li { + display:inline; + font-size:0.9em; +} +div.inheritance { + margin:0; + padding:0; +} +div.inheritance div.inheritance { + margin-left:2em; +} +ul.block-list, +ul.details-list, +ul.member-list, +ul.summary-list { + margin:10px 0 10px 0; + padding:0; +} +ul.block-list > li, +ul.details-list > li, +ul.member-list > li, +ul.summary-list > li { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +.summary-table dl, .summary-table dl dt, .summary-table dl dd { + margin-top:0; + margin-bottom:1px; +} +ul.see-list, ul.see-list-long { + padding-left: 0; + list-style: none; +} +ul.see-list li { + display: inline; +} +ul.see-list li:not(:last-child):after, +ul.see-list-long li:not(:last-child):after { + content: ", "; + white-space: pre-wrap; +} +/* + * Styles for tables. + */ +.summary-table, .details-table { + width:100%; + border-spacing:0; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; + padding:0; +} +.caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0; + padding-top:10px; + padding-left:1px; + margin:0; + white-space:pre; +} +.caption a:link, .caption a:visited { + color:#1f389c; +} +.caption a:hover, +.caption a:active { + color:#FFFFFF; +} +.caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +div.table-tabs { + padding:10px 0 0 1px; + margin:0; +} +div.table-tabs > button { + border: none; + cursor: pointer; + padding: 5px 12px 7px 12px; + font-weight: bold; + margin-right: 3px; +} +div.table-tabs > button.active-table-tab { + background: #F8981D; + color: #253441; +} +div.table-tabs > button.table-tab { + background: #4D7A97; + color: #FFFFFF; +} +.two-column-summary { + display: grid; + grid-template-columns: minmax(15%, max-content) minmax(15%, auto); +} +.three-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(15%, max-content) minmax(15%, auto); +} +.four-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(10%, max-content) minmax(10%, max-content) minmax(10%, auto); +} +@media screen and (max-width: 600px) { + .two-column-summary { + display: grid; + grid-template-columns: 1fr; + } +} +@media screen and (max-width: 800px) { + .three-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(25%, auto); + } + .three-column-summary .col-last { + grid-column-end: span 2; + } +} +@media screen and (max-width: 1000px) { + .four-column-summary { + display: grid; + grid-template-columns: minmax(15%, max-content) minmax(15%, auto); + } +} +.summary-table > div, .details-table > div { + text-align:left; + padding: 8px 3px 3px 7px; +} +.col-first, .col-second, .col-last, .col-constructor-name, .col-summary-item-name { + vertical-align:top; + padding-right:0; + padding-top:8px; + padding-bottom:3px; +} +.table-header { + background:#dee3e9; + font-weight: bold; +} +.col-first, .col-first { + font-size:13px; +} +.col-second, .col-second, .col-last, .col-constructor-name, .col-summary-item-name, .col-last { + font-size:13px; +} +.col-first, .col-second, .col-constructor-name { + vertical-align:top; + overflow: auto; +} +.col-last { + white-space:normal; +} +.col-first a:link, .col-first a:visited, +.col-second a:link, .col-second a:visited, +.col-first a:link, .col-first a:visited, +.col-second a:link, .col-second a:visited, +.col-constructor-name a:link, .col-constructor-name a:visited, +.col-summary-item-name a:link, .col-summary-item-name a:visited, +.constant-values-container a:link, .constant-values-container a:visited, +.all-classes-container a:link, .all-classes-container a:visited, +.all-packages-container a:link, .all-packages-container a:visited { + font-weight:bold; +} +.table-sub-heading-color { + background-color:#EEEEFF; +} +.even-row-color, .even-row-color .table-header { + background-color:#FFFFFF; +} +.odd-row-color, .odd-row-color .table-header { + background-color:#EEEEEF; +} +/* + * Styles for contents. + */ +.deprecated-content { + margin:0; + padding:10px 0; +} +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +.col-last div { + padding-top:0; +} +.col-last a { + padding-bottom:3px; +} +.module-signature, +.package-signature, +.type-signature, +.member-signature { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + margin:14px 0; + white-space: pre-wrap; +} +.module-signature, +.package-signature, +.type-signature { + margin-top: 0; +} +.member-signature .type-parameters-long, +.member-signature .parameters, +.member-signature .exceptions { + display: inline-block; + vertical-align: top; + white-space: pre; +} +.member-signature .type-parameters { + white-space: normal; +} +/* + * Styles for formatting effect. + */ +.source-line-no { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:0 10px 5px 0; + color:#474747; +} +.deprecated-label, .descfrm-type-label, .implementation-label, .member-name-label, .member-name-link, +.module-label-in-package, .module-label-in-type, .override-specify-label, .package-label-in-type, +.package-hierarchy-label, .type-name-label, .type-name-link, .search-tag-link, .preview-label { + font-weight:bold; +} +.deprecation-comment, .help-footnote, .preview-comment { + font-style:italic; +} +.deprecation-block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; + border-style:solid; + border-width:thin; + border-radius:10px; + padding:10px; + margin-bottom:10px; + margin-right:10px; + display:inline-block; +} +.preview-block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; + border-style:solid; + border-width:thin; + border-radius:10px; + padding:10px; + margin-bottom:10px; + margin-right:10px; + display:inline-block; +} +div.block div.deprecation-comment { + font-style:normal; +} +/* + * Styles specific to HTML5 elements. + */ +main, nav, header, footer, section { + display:block; +} +/* + * Styles for javadoc search. + */ +.ui-autocomplete-category { + font-weight:bold; + font-size:15px; + padding:7px 0 7px 3px; + background-color:#4D7A97; + color:#FFFFFF; +} +.result-item { + font-size:13px; +} +.ui-autocomplete { + max-height:85%; + max-width:65%; + overflow-y:scroll; + overflow-x:scroll; + white-space:nowrap; + box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); +} +ul.ui-autocomplete { + position:fixed; + z-index:999999; +} +ul.ui-autocomplete li { + float:left; + clear:both; + width:100%; +} +.result-highlight { + font-weight:bold; +} +#search-input { + background-image:url('resources/glass.png'); + background-size:13px; + background-repeat:no-repeat; + background-position:2px 3px; + padding-left:20px; + position:relative; + right:-18px; + width:400px; +} +#reset-button { + background-color: rgb(255,255,255); + background-image:url('resources/x.png'); + background-position:center; + background-repeat:no-repeat; + background-size:12px; + border:0 none; + width:16px; + height:16px; + position:relative; + left:-4px; + top:-4px; + font-size:0px; +} +.watermark { + color:#545454; +} +.search-tag-desc-result { + font-style:italic; + font-size:11px; +} +.search-tag-holder-result { + font-style:italic; + font-size:12px; +} +.search-tag-result:target { + background-color:yellow; +} +.module-graph span { + display:none; + position:absolute; +} +.module-graph:hover span { + display:block; + margin: -100px 0 0 100px; + z-index: 1; +} +.inherited-list { + margin: 10px 0 10px 0; +} +section.class-description { + line-height: 1.4; +} +.summary section[class$="-summary"], .details section[class$="-details"], +.class-uses .detail, .serialized-class-details { + padding: 0px 20px 5px 10px; + border: 1px solid #ededed; + background-color: #f8f8f8; +} +.inherited-list, section[class$="-details"] .detail { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +.vertical-separator { + padding: 0 5px; +} +ul.help-section-list { + margin: 0; +} +ul.help-subtoc > li { + display: inline-block; + padding-right: 5px; + font-size: smaller; +} +ul.help-subtoc > li::before { + content: "\2022" ; + padding-right:2px; +} +span.help-note { + font-style: italic; +} +/* + * Indicator icon for external links. + */ +main a[href*="://"]::after { + content:""; + display:inline-block; + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); + background-size:100% 100%; + width:7px; + height:7px; + margin-left:2px; + margin-bottom:4px; +} +main a[href*="://"]:hover::after, +main a[href*="://"]:focus::after { + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); +} + +/* + * Styles for user-provided tables. + * + * borderless: + * No borders, vertical margins, styled caption. + * This style is provided for use with existing doc comments. + * In general, borderless tables should not be used for layout purposes. + * + * plain: + * Plain borders around table and cells, vertical margins, styled caption. + * Best for small tables or for complex tables for tables with cells that span + * rows and columns, when the "striped" style does not work well. + * + * striped: + * Borders around the table and vertical borders between cells, striped rows, + * vertical margins, styled caption. + * Best for tables that have a header row, and a body containing a series of simple rows. + */ + +table.borderless, +table.plain, +table.striped { + margin-top: 10px; + margin-bottom: 10px; +} +table.borderless > caption, +table.plain > caption, +table.striped > caption { + font-weight: bold; + font-size: smaller; +} +table.borderless th, table.borderless td, +table.plain th, table.plain td, +table.striped th, table.striped td { + padding: 2px 5px; +} +table.borderless, +table.borderless > thead > tr > th, table.borderless > tbody > tr > th, table.borderless > tr > th, +table.borderless > thead > tr > td, table.borderless > tbody > tr > td, table.borderless > tr > td { + border: none; +} +table.borderless > thead > tr, table.borderless > tbody > tr, table.borderless > tr { + background-color: transparent; +} +table.plain { + border-collapse: collapse; + border: 1px solid black; +} +table.plain > thead > tr, table.plain > tbody tr, table.plain > tr { + background-color: transparent; +} +table.plain > thead > tr > th, table.plain > tbody > tr > th, table.plain > tr > th, +table.plain > thead > tr > td, table.plain > tbody > tr > td, table.plain > tr > td { + border: 1px solid black; +} +table.striped { + border-collapse: collapse; + border: 1px solid black; +} +table.striped > thead { + background-color: #E3E3E3; +} +table.striped > thead > tr > th, table.striped > thead > tr > td { + border: 1px solid black; +} +table.striped > tbody > tr:nth-child(even) { + background-color: #EEE +} +table.striped > tbody > tr:nth-child(odd) { + background-color: #FFF +} +table.striped > tbody > tr > th, table.striped > tbody > tr > td { + border-left: 1px solid black; + border-right: 1px solid black; +} +table.striped > tbody > tr > th { + font-weight: normal; +} +/** + * Tweak font sizes and paddings for small screens. + */ +@media screen and (max-width: 1050px) { + #search-input { + width: 300px; + } +} +@media screen and (max-width: 800px) { + #search-input { + width: 200px; + } + .top-nav, + .bottom-nav { + font-size: 11px; + padding-top: 6px; + } + .sub-nav { + font-size: 11px; + } + .about-language { + padding-right: 16px; + } + ul.nav-list li, + .sub-nav .nav-list-search { + padding: 6px; + } + ul.sub-nav-list li { + padding-top: 5px; + } + main { + padding: 10px; + } + .summary section[class$="-summary"], .details section[class$="-details"], + .class-uses .detail, .serialized-class-details { + padding: 0 8px 5px 8px; + } + body { + -webkit-text-size-adjust: none; + } +} +@media screen and (max-width: 500px) { + #search-input { + width: 150px; + } + .top-nav, + .bottom-nav { + font-size: 10px; + } + .sub-nav { + font-size: 10px; + } + .about-language { + font-size: 10px; + padding-right: 12px; + } +} diff --git a/livraison/doc/server/tag-search-index.js b/livraison/doc/server/tag-search-index.js new file mode 100644 index 0000000..bf10aaf --- /dev/null +++ b/livraison/doc/server/tag-search-index.js @@ -0,0 +1 @@ +tagSearchIndex = [{"l":"Constant Field Values","h":"","u":"constant-values.html"},{"l":"Serialized Form","h":"","u":"serialized-form.html"}];updateSearchResults(); \ No newline at end of file diff --git a/livraison/doc/server/type-search-index.js b/livraison/doc/server/type-search-index.js new file mode 100644 index 0000000..dc70b67 --- /dev/null +++ b/livraison/doc/server/type-search-index.js @@ -0,0 +1 @@ +typeSearchIndex = [{"p":"fr.lnl.game.server.games.action","l":"AbstractAction"},{"p":"fr.lnl.game.server.games.grid.elements","l":"AbstractBox"},{"p":"fr.lnl.game.server.games.grid.build","l":"AbstractGridFactoryBuilder"},{"p":"fr.lnl.game.server.listener","l":"AbstractModelListening"},{"p":"fr.lnl.game.server.games.player","l":"AbstractPlayer"},{"p":"fr.lnl.game.server.games.action","l":"Action"},{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"fr.lnl.game.server.games.grid.elements","l":"Bomb"},{"p":"fr.lnl.game.server.games.grid.elements","l":"Box"},{"p":"fr.lnl.game.server.games.player","l":"ClassPlayer"},{"p":"fr.lnl.game.server.games.player","l":"ComputerPlayer"},{"p":"fr.lnl.game.server.games.grid.elements","l":"CountdownBox"},{"p":"fr.lnl.game.server.utils","l":"CrashException"},{"p":"fr.lnl.game.server.games.action","l":"DeployShield"},{"p":"fr.lnl.game.server.games.action","l":"Direction"},{"p":"fr.lnl.game.server.games.action","l":"Direction4Axis"},{"p":"fr.lnl.game.server.games.action","l":"Direction8Axis"},{"p":"fr.lnl.game.server.games.action","l":"DropBomb"},{"p":"fr.lnl.game.server.games.action","l":"DropMine"},{"p":"fr.lnl.game.server.games.action","l":"DropObject"},{"p":"fr.lnl.game.server.games.grid.elements","l":"EnergyBall"},{"p":"fr.lnl.game.server.utils","l":"ErrorMessage"},{"p":"fr.lnl.game.server.games.grid.elements","l":"Explosive"},{"p":"fr.lnl.game.server.games.weapon","l":"Firearm"},{"p":"fr.lnl.game.server.games","l":"Game"},{"p":"fr.lnl.game.server.games.grid","l":"Grid"},{"p":"fr.lnl.game.server.games.grid.build","l":"GridFactoryBuilder"},{"p":"fr.lnl.game.server.games.player","l":"HumanPlayer"},{"p":"fr.lnl.game.server.games.grid.elements","l":"InteractiveBox"},{"p":"fr.lnl.game.server.games.grid.build","l":"LockGridFactoryBuilder"},{"p":"fr.lnl.game.server.utils","l":"Maths"},{"p":"fr.lnl.game.server.games.grid.elements","l":"Mine"},{"p":"fr.lnl.game.server.listener","l":"ModelListener"},{"p":"fr.lnl.game.server.games.action","l":"Move"},{"p":"fr.lnl.game.server.games.action","l":"NoMoreBulletInWeaponException"},{"p":"fr.lnl.game.server.games.action","l":"Nothing"},{"p":"fr.lnl.game.server.games.action","l":"NotValidDirectionException"},{"p":"fr.lnl.game.server.utils","l":"Pair"},{"p":"fr.lnl.game.server.games.player","l":"Player"},{"p":"fr.lnl.game.server.utils","l":"Point"},{"p":"fr.lnl.game.server.games.player","l":"RandomComputerPlayer"},{"p":"fr.lnl.game.server.games.action","l":"ReunionSameAction"},{"p":"fr.lnl.game.server","l":"ServerMain"},{"p":"fr.lnl.game.server.games.action","l":"Shot"},{"p":"fr.lnl.game.server.games.player","l":"StrategyComputerPlayer"},{"p":"fr.lnl.game.server.games.grid.elements","l":"Wall"},{"p":"fr.lnl.game.server.games.weapon","l":"Weapon"}];updateSearchResults(); \ No newline at end of file diff --git a/livraison/gradlew b/livraison/gradlew new file mode 100644 index 0000000..4f906e0 --- /dev/null +++ b/livraison/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/livraison/gradlew.bat b/livraison/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/livraison/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/livraison/server/build.gradle b/livraison/server/build.gradle new file mode 100644 index 0000000..fcdcfb0 --- /dev/null +++ b/livraison/server/build.gradle @@ -0,0 +1,26 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id 'application' + id 'fr.lnl.game.java-library-conventions' +} + +dependencies { + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2' +} + +compileJava { + options.encoding = 'UTF-8' +} + +application { + mainClassName = 'fr.lnl.game.server.ServerMain' +} + +test { + useJUnitPlatform() +} + diff --git a/livraison/server/src/main/java/fr/lnl/game/server/ServerMain.java b/livraison/server/src/main/java/fr/lnl/game/server/ServerMain.java new file mode 100644 index 0000000..aa21823 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/ServerMain.java @@ -0,0 +1,9 @@ +package fr.lnl.game.server; + +public class ServerMain { + + public static void main(String[] args) { + throw new UnsupportedOperationException("Server standalone launch not supported, please use tests or launch the" + + " game from the client"); + } +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/Game.java b/livraison/server/src/main/java/fr/lnl/game/server/games/Game.java new file mode 100644 index 0000000..8e9c242 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/Game.java @@ -0,0 +1,212 @@ +package fr.lnl.game.server.games; + +import fr.lnl.game.server.games.action.*; +import fr.lnl.game.server.games.grid.Grid; +import fr.lnl.game.server.games.grid.build.GridFactoryBuilder; +import fr.lnl.game.server.games.grid.elements.CountdownBox; +import fr.lnl.game.server.games.player.ComputerPlayer; +import fr.lnl.game.server.games.player.Player; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Stream; + +import static java.util.function.Predicate.not; + +public class Game { + + private final Grid grid; + private final List players; + private Player currentPlayer; + private Action selectedAction = null; + private int nbrTurn; + private Player previousPlayer; + + /** + * @param buildStrategy used to build a grid + * @param players a list players in the game + * @throws IllegalArgumentException if number of players given in parameters is too many or inferior to 2 + */ + public Game(GridFactoryBuilder buildStrategy, List players) throws IllegalArgumentException { + this.grid = buildStrategy.playersList(players).build(); + if(players.size() < 2) + throw new IllegalArgumentException("The game need 2 or more player to start"); + if(players.size() > grid.getNumberNeutralBox()){ + throw new IllegalArgumentException("There are too many players for the number of box available"); + } + this.players = players; + this.currentPlayer = players.get(0); + this.nbrTurn = 1; + this.previousPlayer = null; + initGame(buildStrategy); + } + + /** + * Initialize a game by placing players on the grid and by generating current player available actions + * @param buildStrategy builder used to create a grid + */ + public void initGame(GridFactoryBuilder buildStrategy){ + buildStrategy.initPlacePlayers(); + currentPlayer.setActions(generateAndGetPlayerActions(currentPlayer)); + } + + /** + * Game "main" method, call by a controller after human chose an action or when a computer player play an action + * Method is call everytime an action has been chosen by a human or when aa computer player need to play + * @return true if game is over, false otherwise + */ + public boolean play() { + if(currentPlayer instanceof ComputerPlayer computer) + // si le joueur est humain alors le choix se fait avant l'appel de play() + selectedAction = computer.choseAction(this); + selectedAction.doAction(); + countdownGridElementsUpdate(); + gridPlayersUpdate(); + previousPlayer = currentPlayer; + nextCurrentPlayer(); + currentPlayer.setActions(generateAndGetPlayerActions(currentPlayer)); + nbrTurn++; + return isOver(); + } + + /** + * Remove dead players from the grid + */ + private void gridPlayersUpdate(){ + for (Player player: getPlayersNotAlive().toList()) { + getGrid().getBoard().get(player.getPosition()).setA(null); + } + } + + /** + * play grid's elements that use a timer like {@link fr.lnl.game.server.games.grid.elements.Bomb} at each game tick + */ + private void countdownGridElementsUpdate() { + List countdownBoxes = this.getGrid().getAllCountdownElements(); + countdownBoxes.forEach(CountdownBox::update); + } + + /** + * Used to list all actions a player can execute at current time + * @param player the player to generate actions + * @return a list of available actions + */ + public List generateAndGetPlayerActions(Player player) { + List actions = new ArrayList<>(); + for(Direction4Axis direction : Direction4Axis.values()) { + try { + actions.add(new Move(this, player, direction)); + } catch (NotValidDirectionException ignored){} + try { + actions.add(new Shot(this, player, direction)); + } catch (NotValidDirectionException | NoMoreBulletInWeaponException ignored) {} + + } + for(Direction8Axis direction : Direction8Axis.values()) { + try { + actions.add(new DropBomb(this, player, direction)); + } catch (NotValidDirectionException ignored) {} + try { + actions.add(new DropMine(this, player, direction)); + } catch (NotValidDirectionException ignored) {} + } + actions.addAll(Arrays.asList(new Nothing(), new DeployShield(player))); + return actions; + } + + /** + * + * @return a list of alive players + */ + public Stream getPlayersAlive() { + return players.parallelStream().filter(Player::isAlive); + } + + /** + * Opposite of {@link Game#getPlayersAlive()} + * @return a list of dead players + */ + public Stream getPlayersNotAlive() { + return players.parallelStream().filter(not(Player::isAlive)); + } + + /** + * A game is over if the number of alive players is inferior to 2 + * @return true if game is over, false otherwise + */ + public boolean isOver() { + return getPlayersAlive().count() <= 1; + } + + /** + * + * @return the winner of the game if exists, null otherwise.
          + * return the only remaining alive player when it exists, or null if everyone is dead, per example when a bomb kill + * the 2 remaining players + */ + public Player getWinner() { + // On part du principe que isOver est forcément appelé avant d'appeler getWinner + return getPlayersAlive().findFirst().orElse(null); + } + + /** + * + * @return the player who is currently playing + */ + public Player getCurrentPlayer() { + return currentPlayer; + } + + /** + * Change player to the next available in the list.
          + * We set its shield deploy state to false. + */ + public void nextCurrentPlayer() { + do { + int index = players.indexOf(currentPlayer) + 1; + if(index == players.size()) + index = 0; + setCurrentPlayer(players.get(index)); + } while(!currentPlayer.isAlive()); // On arrête la boucle dès qu'on trouve un joueur en vie + currentPlayer.setShieldDeploy(false); // on reset son état + } + + /** + * @param current_player the new current player + */ + public void setCurrentPlayer(Player current_player) { + this.currentPlayer = current_player; + } + + public Grid getGrid() { + return grid; + } + + public List getPlayers() { + return players; + } + + /** + * + * @return action selected by current player if not already executed or last player if already executed + */ + public Action getSelectedAction() { + return selectedAction; + } + + /** + * @param selectedAction set the action selected by current player before doing it + */ + public void setSelectedAction(Action selectedAction) { + this.selectedAction = selectedAction; + } + + public int getNbrTurn() { + return nbrTurn; + } + + public Player getPreviousPlayer() { + return previousPlayer; + } +} \ No newline at end of file diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/action/AbstractAction.java b/livraison/server/src/main/java/fr/lnl/game/server/games/action/AbstractAction.java new file mode 100644 index 0000000..e4a51ac --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/action/AbstractAction.java @@ -0,0 +1,16 @@ +package fr.lnl.game.server.games.action; + +import fr.lnl.game.server.games.Game; +import fr.lnl.game.server.games.player.Player; + +public abstract class AbstractAction implements Action { + + protected final Game game; + protected final Player player; + + public AbstractAction(Game game, Player player){ + this.game = game; + this.player = player; + } + +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/action/Action.java b/livraison/server/src/main/java/fr/lnl/game/server/games/action/Action.java new file mode 100644 index 0000000..f8f3524 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/action/Action.java @@ -0,0 +1,28 @@ +package fr.lnl.game.server.games.action; + + +import fr.lnl.game.server.utils.Point; + +import java.util.List; + +public interface Action { + + /** + * Call by {@link fr.lnl.game.server.games.Game} when player do this action + */ + void doAction(); + + /** + * + * @return true if this action is possible, false otherwise + */ + boolean isPossible(); + + /** + * Used by {@link Move}, {@link Shot} and {@link DropObject} to list all direction where the action is possible + * @return a list a point where the action is possible (not block by a wall per example) + */ + Point getPoint(); + List getValidPoint(); + +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/action/DeployShield.java b/livraison/server/src/main/java/fr/lnl/game/server/games/action/DeployShield.java new file mode 100644 index 0000000..ffc67df --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/action/DeployShield.java @@ -0,0 +1,47 @@ +package fr.lnl.game.server.games.action; + +import fr.lnl.game.server.games.player.Player; +import fr.lnl.game.server.utils.Point; + +import java.util.List; + +/** + * Used when a player want to protect himself from taking damage (shield state is reset to false at next player turn) + */ +public class DeployShield extends AbstractAction { + + public DeployShield(Player player){ + super(null, player); + } + + /** + * Deploy player shield and decrement its energy + */ + @Override + public void doAction(){ + player.decrementEnergy(player.getClassPlayer().getShieldCost()); + player.setShieldDeploy(true); + } + + /** + * This action is always possible + * @return always true + */ + @Override + public boolean isPossible() { + return true; + } + + @Override + public Point getPoint() { + return null; + } + + @Override + public List getValidPoint() { + return null; + } + + +} + diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/action/Direction.java b/livraison/server/src/main/java/fr/lnl/game/server/games/action/Direction.java new file mode 100644 index 0000000..55976c4 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/action/Direction.java @@ -0,0 +1,8 @@ +package fr.lnl.game.server.games.action; + +public interface Direction { + + int getDeltaX(); + + int getDeltaY(); +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/action/Direction4Axis.java b/livraison/server/src/main/java/fr/lnl/game/server/games/action/Direction4Axis.java new file mode 100644 index 0000000..4c3edea --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/action/Direction4Axis.java @@ -0,0 +1,41 @@ +package fr.lnl.game.server.games.action; + +/** + * Enum used to chose where to move, shot, etc. + */ +public enum Direction4Axis implements Direction { + + UP(-1, 0, true), + DOWN(1, 0, true), + LEFT(0, -1, false), + RIGHT(0, 1, false); + + private final int deltaX; + private final int deltaY; + private final boolean isVertical; + + Direction4Axis(int i, int i1, boolean isVertical) { + this.deltaX = i; + this.deltaY = i1; + this.isVertical = isVertical; + } + + @Override + public int getDeltaX() { + return deltaX; + } + + @Override + public int getDeltaY() { + return deltaY; + } + + /** + * Used by {@link Shot} to know if the direction is in vertical direction cause shot action can have a different + * distance depending on the direction + * @return true if the direction is vertical + */ + public boolean isVertical() { + return isVertical; + } +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/action/Direction8Axis.java b/livraison/server/src/main/java/fr/lnl/game/server/games/action/Direction8Axis.java new file mode 100644 index 0000000..fe3cf48 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/action/Direction8Axis.java @@ -0,0 +1,33 @@ +package fr.lnl.game.server.games.action; + +public enum Direction8Axis implements Direction { + + UP(-1, 0), + DOWN(1, 0), + LEFT(0, -1), + RIGHT(0, 1), + UP_LEFT(-1, -1), + UP_RIGHT(-1, 1), + DOWN_RIGHT(1, 1), + DOWN_LEFT(1, -1); + + private final int deltaX; + private final int deltaY; + + Direction8Axis(int i, int i1) { + this.deltaX = i; + this.deltaY = i1; + } + + @Override + public int getDeltaX() { + return deltaX; + } + + @Override + public int getDeltaY() { + return deltaY; + } + + +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/action/DropBomb.java b/livraison/server/src/main/java/fr/lnl/game/server/games/action/DropBomb.java new file mode 100644 index 0000000..b078633 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/action/DropBomb.java @@ -0,0 +1,26 @@ +package fr.lnl.game.server.games.action; + +import fr.lnl.game.server.games.Game; +import fr.lnl.game.server.games.grid.elements.Bomb; +import fr.lnl.game.server.games.player.Player; + +/** + * Used when player want to drop a {@link Bomb}, bomb explode when someone walks on it and after 3 turns + */ +public class DropBomb extends DropObject { + + public DropBomb(Game game, Player player, Direction8Axis direction) throws NotValidDirectionException { + super(game, player, direction); + } + + /** + * Drop a bomb in player's selected direction and decrement its energy + */ + @Override + public void doAction() { + game.getGrid().getBoard().get(point).setB(new Bomb(point, game)); + player.decrementEnergy(player.getClassPlayer().getBombCost()); + } + +} + diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/action/DropMine.java b/livraison/server/src/main/java/fr/lnl/game/server/games/action/DropMine.java new file mode 100644 index 0000000..d70ffec --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/action/DropMine.java @@ -0,0 +1,26 @@ +package fr.lnl.game.server.games.action; + +import fr.lnl.game.server.games.Game; +import fr.lnl.game.server.games.grid.elements.Mine; +import fr.lnl.game.server.games.player.Player; + +/** + * Used when player want to drop a {@link Mine}, Mine only explode when someone walks on it + */ +public class DropMine extends DropObject { + + public DropMine(Game game, Player player, Direction8Axis direction) throws NotValidDirectionException { + super(game, player, direction); + + } + + /** + * Drop a mine in player's selected direction and decrement its energy + */ + @Override + public void doAction() { + game.getGrid().getBoard().get(point).setB(new Mine(player, point)); + game.getCurrentPlayer().decrementEnergy(player.getClassPlayer().getMineCost()); + } + +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/action/DropObject.java b/livraison/server/src/main/java/fr/lnl/game/server/games/action/DropObject.java new file mode 100644 index 0000000..d146b25 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/action/DropObject.java @@ -0,0 +1,78 @@ +package fr.lnl.game.server.games.action; + +import fr.lnl.game.server.games.Game; +import fr.lnl.game.server.games.grid.elements.Box; +import fr.lnl.game.server.games.player.Player; +import fr.lnl.game.server.utils.Pair; +import fr.lnl.game.server.utils.Point; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +/** + * Super class used by {@link DropMine} and {@link DropBomb} + */ +public abstract class DropObject extends AbstractAction { + + protected final Point point; + private final Direction8Axis direction; + + /** + * @param player basically current player + * @param direction chosen direction + * @throws NotValidDirectionException throw when the chosen direction is invalid + */ + public DropObject(Game game, Player player, Direction8Axis direction) throws NotValidDirectionException { + super(game, player); + List points = getValidPoint(); + Point playerPosition = player.getPosition(); + Point dropDirection = new Point(playerPosition.getA() + direction.getDeltaX(), playerPosition.getB() + direction.getDeltaY()); + if(!points.contains(dropDirection)) { + throw new NotValidDirectionException(direction + " isn't a valid position"); + } + this.point = dropDirection; + this.direction = direction; + } + + /** + * + * @return true if player can play this action in current context, false otherwise + */ + @Override + public boolean isPossible() { + return !getValidPoint().isEmpty(); + } + + /** + * @return a list of point where it's possible to place a bomb of a mine. + * We add a point where there is nothing on the board. + * @see Action#getValidPoint() + */ + public List getValidPoint() { + List listMoves = new ArrayList<>(); + HashMap> board = game.getGrid().getBoard(); + Point position = player.getPosition(); + for (int row = -1; row <= 1; row++) { + for (int column = -1; column <= 1; column++) { + if(game.getGrid().boardPositionIsValid(position.getA(),row,position.getB(),column)){ + Point neighbour = new Point(position.getA() + row, position.getB() + column); + Pair state = board.get(neighbour); + if(state.getA() == null && state.getB() == null){ + listMoves.add(neighbour); + } + } + } + } + return listMoves; + } + + public Direction8Axis getDirection() { + return direction; + } + + @Override + public Point getPoint() { + return point; + } +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/action/Move.java b/livraison/server/src/main/java/fr/lnl/game/server/games/action/Move.java new file mode 100644 index 0000000..ed51fae --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/action/Move.java @@ -0,0 +1,95 @@ +package fr.lnl.game.server.games.action; + +import fr.lnl.game.server.games.Game; +import fr.lnl.game.server.games.grid.elements.Box; +import fr.lnl.game.server.games.grid.elements.InteractiveBox; +import fr.lnl.game.server.games.grid.elements.Wall; +import fr.lnl.game.server.games.player.Player; +import fr.lnl.game.server.utils.Pair; +import fr.lnl.game.server.utils.Point; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +/** + * Used when the player want to move in a direction, it can move in a direction when there is another player or a wall + */ +public class Move extends AbstractAction { + + private final Point point; + private final Direction4Axis direction; + + public Move(Game game, Player player, Direction4Axis direction) throws NotValidDirectionException { + super(game, player); + List points = getValidPoint(); + Point playerPosition = player.getPosition(); + Point newPosition = new Point(playerPosition.getA() + direction.getDeltaX(), playerPosition.getB() + direction.getDeltaY()); + if(!points.contains(newPosition)) { + throw new NotValidDirectionException(direction + " isn't a valid position"); + } + this.point = newPosition; + this.direction = direction; + } + + /** + * Move player to its new position and decrement its point + */ + @Override + public void doAction() { + game.getGrid().getBoard().get(player.getPosition()).setA(null); + game.getGrid().getBoard().get(this.point).setA(player); + player.setPosition(this.point); + player.decrementEnergy(player.getClassPlayer().getMoveCost()); + Box box = game.getGrid().getBoard().get(this.point).getB(); + if(box instanceof InteractiveBox interactiveBox) { + interactiveBox.interact(game.getGrid(), player, this.point); + } + } + + /** + * @return true if player can play this action in current context, false otherwise + */ + @Override + public boolean isPossible() { + return !getValidPoint().isEmpty(); + } + + /** + * @return a list of point where it's possible to move. + * We add a point to the list where there is nothing on the board. + * @see Action#getValidPoint() + */ + + @Override + public List getValidPoint() { + List listMoves = new ArrayList<>(); + HashMap> board = game.getGrid().getBoard(); + Point position = player.getPosition(); + for (int deltarow = -1; deltarow <= 1; deltarow++) { + for (int deltacolumn = -1; deltacolumn <= 1; deltacolumn++) { + if(deltarow == 0 || deltacolumn == 0){ + if(game.getGrid().boardPositionIsValid(position.getA(),deltarow,position.getB(),deltacolumn)){ + Point neighbour = new Point(position.getA() + deltarow, position.getB() + deltacolumn); + Pair state = board.get(neighbour); + if(state.getA() == null && !(state.getB() instanceof Wall)){ + listMoves.add(neighbour); + } + } + } + } + } + return listMoves; + } + + @Override + public Point getPoint() { + return point; + } + + public Direction4Axis getDirection() { + return direction; + } + + +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/action/NoMoreBulletInWeaponException.java b/livraison/server/src/main/java/fr/lnl/game/server/games/action/NoMoreBulletInWeaponException.java new file mode 100644 index 0000000..06ecde2 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/action/NoMoreBulletInWeaponException.java @@ -0,0 +1,12 @@ +package fr.lnl.game.server.games.action; + +/** + * This exception is throw when player has no remaining bullet + */ +public class NoMoreBulletInWeaponException extends Exception { + + public NoMoreBulletInWeaponException() { + super(); + } + +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/action/NotValidDirectionException.java b/livraison/server/src/main/java/fr/lnl/game/server/games/action/NotValidDirectionException.java new file mode 100644 index 0000000..f360c89 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/action/NotValidDirectionException.java @@ -0,0 +1,12 @@ +package fr.lnl.game.server.games.action; + +/** + * throw when action instantiated and the chosen direction in constructor isn't valid + */ +public class NotValidDirectionException extends Exception { + + public NotValidDirectionException(String message) { + super(message); + } + +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/action/Nothing.java b/livraison/server/src/main/java/fr/lnl/game/server/games/action/Nothing.java new file mode 100644 index 0000000..1157815 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/action/Nothing.java @@ -0,0 +1,41 @@ +package fr.lnl.game.server.games.action; + +import fr.lnl.game.server.utils.Point; + +import java.util.List; + +/** + * This action is used when player doesn't want to move and/or loose energy + */ +public class Nothing extends AbstractAction { + + public Nothing() { + super(null, null); + } + + /** + * doAction in this context don't execute any operation + */ + @Override + public void doAction(){ + } + + /** + * This action is always possible + * @return always true + */ + @Override + public boolean isPossible() { + return true; + } + + @Override + public Point getPoint() { + return null; + } + + @Override + public List getValidPoint() { + return null; + } +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/action/ReunionSameAction.java b/livraison/server/src/main/java/fr/lnl/game/server/games/action/ReunionSameAction.java new file mode 100644 index 0000000..dbd3f1c --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/action/ReunionSameAction.java @@ -0,0 +1,41 @@ +package fr.lnl.game.server.games.action; + +import java.util.ArrayList; +import java.util.List; + +/** + * When we generate action, we generate one per available direction (like in {@link Move}) but to improve human + * readability, we list every same Action here + */ +public class ReunionSameAction { + + private final String actionName; + private List actions; + + public ReunionSameAction(String actionName){ + this.actionName = actionName; + this.actions = new ArrayList<>(); + } + + public ReunionSameAction(String actionName, Action action){ + this(actionName); + this.actions = new ArrayList<>(List.of(action)); + } + + public List getActions() { + return actions; + } + + + public String getActionName() { + return actionName; + } + + public Action getAction(int value) { + return getActions().get(value); + } + + public void addAction(Action action) { + this.actions.add(action); + } +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/action/Shot.java b/livraison/server/src/main/java/fr/lnl/game/server/games/action/Shot.java new file mode 100644 index 0000000..4640941 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/action/Shot.java @@ -0,0 +1,115 @@ +package fr.lnl.game.server.games.action; + +import fr.lnl.game.server.games.Game; +import fr.lnl.game.server.games.grid.elements.Wall; +import fr.lnl.game.server.games.player.Player; +import fr.lnl.game.server.games.weapon.Weapon; +import fr.lnl.game.server.utils.Point; + +import java.util.ArrayList; +import java.util.List; + +public class Shot extends AbstractAction { + + private final Point point; + private final Direction4Axis direction; + + public Shot(Game game, Player player, Direction4Axis direction) throws NoMoreBulletInWeaponException, NotValidDirectionException { + super(game, player); + if(player.getWeapon().getBullet() == 0) { + throw new NoMoreBulletInWeaponException(); + } + List points = getValidPoint(); + Point playerPosition = player.getPosition(); + Point shotDirection = new Point(playerPosition.getA() + direction.getDeltaX(), playerPosition.getB() + direction.getDeltaY()); + if(!points.contains(shotDirection)) { + throw new NotValidDirectionException(direction + " isn't a valid position"); + } + this.point = shotDirection; + this.direction = direction; + } + + public Shot(Game game, Player player) { + super(game, player); + point = null; + direction = null; + } + + /** + * We decrement player's energy and shot on every of its opponents on the chosen direction by decrementing its + * energy too + */ + @Override + public void doAction() { + player.decrementEnergy(player.getClassPlayer().getShootCost()); + int range = direction.isVertical() ? player.getWeapon().getVerticalDistance() : player.getWeapon().getHorizontalDistance(); + for(int i=0; i < range; i++) { + Point point = new Point(this.point.getA() + (i * direction.getDeltaX()), + this.point.getB() + (i * direction.getDeltaY())); + if(game.getGrid().boardPositionIsValid(point)) { + Player player = game.getGrid().getBoard().get(point).getA(); + if(player != null) { + player.decrementEnergy(player.getClassPlayer().getPenaltyShoot()); + } + } + + } + } + + /** + * @return true if player can play this action in current context, false otherwise + */ + @Override + public boolean isPossible() { + return !getValidPoint().isEmpty(); + } + + /** + * @return a list of point where it's possible to shot. + * We add a point to the list where there is a player depending on the direction and the distance the weapon can + * shoot. + * @see Action#getValidPoint() + */ + @Override + public List getValidPoint() { + List listMoves = new ArrayList<>(); + Point position = game.getCurrentPlayer().getPosition(); + Weapon weapon = game.getCurrentPlayer().getWeapon(); + for(Direction4Axis direction : Direction4Axis.values()) { + Point neighbour = seeNeighbour(position, direction.getDeltaX(), direction.getDeltaY(), + direction.isVertical() ? weapon.getVerticalDistance() : weapon.getHorizontalDistance()); + if(neighbour != null) + listMoves.add(neighbour); + } + return listMoves; + } + + /** + * + * @param point player current position + * @param deltaX given by {@link Direction4Axis} + * @param deltaY given by {@link Direction4Axis} + * @param range given by {@link Weapon#getHorizontalDistance()} or {@link Weapon#getVerticalDistance()} + * @return true if there is a player in the chosen direction, false otherwise + */ + public Point seeNeighbour(Point point, int deltaX, int deltaY, int range) { + if(range == 0) + return null; + for(int i = 0; i < range; i++) { + Point neighbour = new Point(point.getA() + deltaX + (i * deltaX), point.getB() + deltaY + (i * deltaY)); + if(game.getGrid().boardPositionIsValid(neighbour)) { + if(game.getGrid().getBoard().get(neighbour).getB() instanceof Wall) { + return null; + } + if(game.getGrid().getBoard().get(neighbour).getA() instanceof Player) { + return neighbour; + } + } + } + return null; + } + + public Point getPoint() { + return point; + } +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/action/package-info.java b/livraison/server/src/main/java/fr/lnl/game/server/games/action/package-info.java new file mode 100644 index 0000000..0ac3993 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/action/package-info.java @@ -0,0 +1,4 @@ +/** + * Package storing all actions a player can do + */ +package fr.lnl.game.server.games.action; \ No newline at end of file diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/grid/Grid.java b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/Grid.java new file mode 100644 index 0000000..a3378d3 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/Grid.java @@ -0,0 +1,181 @@ +package fr.lnl.game.server.games.grid; + +import fr.lnl.game.server.games.grid.elements.*; +import fr.lnl.game.server.games.player.Player; +import fr.lnl.game.server.utils.Pair; +import fr.lnl.game.server.utils.Point; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +/** + * Class managing the board + */ +public class Grid { + private final HashMap> board; + private final int row; + private final int column; + private final List players; + + public Grid(int row, int column, List players) { + this.row = row; + this.column = column; + this.players = players; + board = new HashMap<>(); + } + + /** + * @see Grid#boardPositionIsValid(int, int) + */ + public boolean boardPositionIsValid(int row, int deltaRow, int column, int deltaColumn){ + return boardPositionIsValid(row + deltaRow, column + deltaColumn); + } + + /** + * Check if given position is in grid area + * @return true if position is valid, false otehrwise + */ + public boolean boardPositionIsValid(int row, int column) { + return row >= 0 && column >= 0 && row < this.row && column < this.column; + } + + /** + * @see Grid#boardPositionIsValid(int, int) + */ + public boolean boardPositionIsValid(Point point) { + return boardPositionIsValid(point.getA(), point.getB()); + } + + /** + * @return the number of neutral box + * @see Grid#isNeutralBox(Box) + */ + public int getNumberNeutralBox(){ + int countBox = 0; + for (int i = 1; i < row - 1; i++) { + for (int j = 1; j < column - 1; j++) { + Box box = board.get(new Point(i,j)).getB(); + if(isNeutralBox(box)){ + countBox++; + } + } + } + return countBox; + } + + /** + * + * @param box the box we'll look state + * @return true if {@code box} isn't a {@link Wall} or a {@link EnergyBall} + */ + public boolean isNeutralBox(Box box){ + return !(box instanceof Wall) && !(box instanceof EnergyBall); + } + + /** + * Given a string representation of the board.
          + * Some characters in given string are in UTF-8 and can be poorly displayed if using an incompatible encoding, like + * on Windows where french regional encoding is {@code windows-1252} + * @return a string view of a board + */ + @Override + public String toString() { + StringBuilder str = new StringBuilder(); + for (int i = 0; i < row; i++) { + str.append("\n"); + for (int j = 0; j < column; j++) { + Pair value = board.get(new Point(i, j)); + if(value.getA() != null){ + str.append(" \033[0;34m").append(value.getA().getId()).append("\033[0m"); + } + else if (value.getB() instanceof Wall) { + str.append(" \033[0;32m#\033[0m"); + } + else if(value.getB() instanceof EnergyBall){ + str.append(" \033[0;31mE\033[0m"); + } + else if(value.getB() instanceof Mine){ + str.append(" \033[0;35mM\033[0m"); + } + else if(value.getB() instanceof Bomb){ + str.append(" \033[0;36mB\033[0m"); + } + else { + str.append(" \033[0;37m.\033[0m"); + } + } + } + return str.toString(); + } + + public String privateView(Player player) { + StringBuilder str = new StringBuilder(); + for (int i = 0; i < row; i++) { + str.append("\n"); + for (int j = 0; j < column; j++) { + Pair value = board.get(new Point(i, j)); + if(value.getA() != null){ + str.append(" \033[0;34m").append(value.getA().getId()).append("\033[0m"); + } + else if (value.getB() instanceof Wall) { + str.append(" \033[0;32m#\033[0m"); + } + else if(value.getB() instanceof EnergyBall){ + str.append(" \033[0;31mE\033[0m"); + } + else if(value.getB() instanceof Explosive){ + if(((Explosive) value.getB()).getPlayer().equals(player)){ + if(value.getB() instanceof Mine){ + str.append(" \033[0;35mM\033[0m"); + } + else if(value.getB() instanceof Bomb){ + str.append(" \033[0;36mB\033[0m"); + } + } + else{ + str.append(" \033[0;37m.\033[0m"); + } + } + else { + str.append(" \033[0;37m.\033[0m"); + } + } + } + return str.toString(); + } + + public HashMap> getBoard() { + return board; + } + + public Player getGridPlayer(Point point){ + return getBoard().get(point).getA(); + } + + public Box getGridBox(Point point){ + return getBoard().get(point).getB(); + } + + public List getPlayers() { + return players; + } + + public int getRow() { + return row; + } + + public int getColumn() { + return column; + } + + public List getAllCountdownElements() { + List list = new ArrayList<>(); + for(Pair element : getBoard().values()) { + if(element.getB() instanceof CountdownBox box) { + list.add(box); + } + } + return list; + } +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/grid/build/AbstractGridFactoryBuilder.java b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/build/AbstractGridFactoryBuilder.java new file mode 100644 index 0000000..b25d9e8 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/build/AbstractGridFactoryBuilder.java @@ -0,0 +1,107 @@ +package fr.lnl.game.server.games.grid.build; + +import fr.lnl.game.server.games.grid.Grid; +import fr.lnl.game.server.games.player.Player; + +import java.util.List; + +public abstract class AbstractGridFactoryBuilder implements GridFactoryBuilder { + + protected float wallProbability, energyProbability; + protected Grid grid; + private int row; + private int columns; + private List players; + + protected AbstractGridFactoryBuilder() { + + } + + /** + * @param probability wall probability, which will be used by + * {@link AbstractGridFactoryBuilder#initPlaceInternWall()} when calling {@link GridFactoryBuilder#build()} + * @return {@code this} + * @see GridFactoryBuilder#wallProbability(float) + */ + public GridFactoryBuilder wallProbability(float probability) { + this.wallProbability = probability; + return this; + } + + /** + * @param probability energy probability, which will be used by + * {@link AbstractGridFactoryBuilder#initPlaceEnergyBall()} when calling {@link GridFactoryBuilder#build()} + * @return {@code this} + * @see GridFactoryBuilder#energyProbability(float) + */ + public GridFactoryBuilder energyProbability(float probability) { + this.energyProbability = probability; + return this; + } + + /** + * + * @param row row grid's size + * @param columns columns grid's size + * @return {@code this} + * @see GridFactoryBuilder#gridDimensions(int, int) + */ + public GridFactoryBuilder gridDimensions(int row, int columns) { + this.row = row; + this.columns = columns; + return this; + } + + /** + * @param players list a players + * @return {@code this} + * @see GridFactoryBuilder#playersList(List) + */ + public GridFactoryBuilder playersList(List players) { + this.players = players; + return this; + } + + /** + * Call this method after you call {{@link GridFactoryBuilder#energyProbability(float)}}, + * {@link GridFactoryBuilder#wallProbability(float)}, {@link GridFactoryBuilder#gridDimensions(int, int)} and + * {@link GridFactoryBuilder#playersList(List)}. It'll instantiate a new {@link Grid} and initialize his components + * like border walls, intern walls, and energy using parameters given previously + * @return an instance of {@link Grid} + */ + @Override + public Grid build() { + this.grid = new Grid(row, columns, players); + initGrid(); + initPlaceInternWall(); + initPlaceEnergyBall(); + return grid; + } + + protected Grid getGrid() { + return grid; + } + + /** + * abstract method used to initialize grid
          + * We let implementation of this class the way to initialize the grid + */ + protected abstract void initGrid(); + + /** + * abstract method used to place energy ball
          + * We let implementation of this class the way to initialize the grid
          + * Implementation need to use {@link AbstractGridFactoryBuilder#energyProbability} to place energy balls + */ + protected abstract void initPlaceEnergyBall(); + + /** + * abstract method used to place intern walls(namely not border walls)
          + * We let implementation of this class the way to initialize the grid.
          + * Implementation need to use {@link AbstractGridFactoryBuilder#wallProbability} to place energy balls + */ + protected abstract void initPlaceInternWall(); + + + +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/grid/build/GridFactoryBuilder.java b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/build/GridFactoryBuilder.java new file mode 100644 index 0000000..f320411 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/build/GridFactoryBuilder.java @@ -0,0 +1,61 @@ +package fr.lnl.game.server.games.grid.build; + +import fr.lnl.game.server.games.grid.Grid; +import fr.lnl.game.server.games.player.Player; + +import java.util.List; + +/** + * Factory pattern + */ +public interface GridFactoryBuilder { + + /** + * Set energy probability
          + * @param probability energy probability, which will be used by + * {@link AbstractGridFactoryBuilder#initPlaceEnergyBall()} when calling {@link GridFactoryBuilder#build()} + * @return {@code this} + */ + GridFactoryBuilder energyProbability(float probability); + + /** + * Set wall probability
          + * @param probability wall probability, which will be used by + * {@link AbstractGridFactoryBuilder#initPlaceInternWall()} when calling {@link GridFactoryBuilder#build()} + * @return {@code this} + */ + GridFactoryBuilder wallProbability(float probability); + + /** + * set grid dimensions. + * Arguments are given when instancing {@link Grid} when using {@link GridFactoryBuilder#build()} + * @param row row grid's size + * @param columns columns grid's size + * @return {@code this} + */ + GridFactoryBuilder gridDimensions(int row, int columns); + + /** + * set players list. + * Argument given to {@link Grid} when calling {@link GridFactoryBuilder#build()} + * @param players list a players + * @return {@code this} + */ + GridFactoryBuilder playersList(List players); + + /** + * Call this method after you call {{@link GridFactoryBuilder#energyProbability(float)}}, + * {@link GridFactoryBuilder#wallProbability(float)}, {@link GridFactoryBuilder#gridDimensions(int, int)} and + * {@link GridFactoryBuilder#playersList(List)}, It'll instantiate a new {@link Grid} and initialize his components + * like border walls, intern walls, and energy using parameters given previously + * @return an instance of {@link Grid} + */ + Grid build(); + + /** + * call when initializing the game, it'll place player depending on the strategy used by its implementation, + * need to be call after build, call an NullPointerException otherwise + */ + void initPlacePlayers(); + +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/grid/build/LockGridFactoryBuilder.java b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/build/LockGridFactoryBuilder.java new file mode 100644 index 0000000..6fd1cc8 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/build/LockGridFactoryBuilder.java @@ -0,0 +1,152 @@ +package fr.lnl.game.server.games.grid.build; + +import fr.lnl.game.server.games.grid.Grid; +import fr.lnl.game.server.games.grid.elements.AbstractBox; +import fr.lnl.game.server.games.grid.elements.Box; +import fr.lnl.game.server.games.grid.elements.EnergyBall; +import fr.lnl.game.server.games.grid.elements.Wall; +import fr.lnl.game.server.games.player.Player; +import fr.lnl.game.server.utils.Pair; +import fr.lnl.game.server.utils.Point; + +import java.util.Random; + +public class LockGridFactoryBuilder extends AbstractGridFactoryBuilder { + + /** + * this method is protected to avoid new instance outside of {@link GridFactoryBuilder} context + */ + protected LockGridFactoryBuilder() { + + } + + /** + * @return a new instance of {@link LockGridFactoryBuilder} used to construct a {@link Grid} + */ + public static GridFactoryBuilder create() { + return new LockGridFactoryBuilder(); + } + + /** + * Method used to initialize grid
          + * We place walls on every border, and we initialize board value as null where there is no need o border walls + * @see AbstractGridFactoryBuilder#initGrid() + */ + @Override + protected void initGrid() { + for (int i = 0; i < getGrid().getRow(); i++) { + for (int j = 0; j < getGrid().getColumn(); j++) { + Box box; + if (i == 0 && j == 0) { + box = new Wall(); + } else if (i == 0 && j == getGrid().getColumn()-1) { + box = new Wall(); + } else if (i == getGrid().getRow()-1 && j == 0) { + box = new Wall(); + } else if (i == getGrid().getRow()-1 && j == getGrid().getColumn()-1) { + box = new Wall(); + } else if (i == 0) { + box = new Wall(); + } else if (i == getGrid().getRow()-1) { + box = new Wall(); + } else if (j == 0) { + box = new Wall(); + } else if (j == getGrid().getColumn()-1) { + box = new Wall(); + } else { + box = null; + } + getGrid().getBoard().put(new Point(i,j), new Pair<>(null,box)); + } + } + } + + /** + * Method used to initialize energy balls, we place energy balls using a random value and a probability and where + * there is no walls + * @see AbstractGridFactoryBuilder#initPlaceEnergyBall() + */ + @Override + protected void initPlaceEnergyBall() { + for (int i = 1; i < getGrid().getRow() - 1; i++) { + for (int j = 1; j < getGrid().getColumn() - 1; j++) { + if(Math.random() >= energyProbability){ + Point point = new Point(i,j); + if(!(getGrid().getBoard().get(point).getB() instanceof Wall)){ + getGrid().getBoard().get(point).setB(new EnergyBall()); + } + } + } + } + } + + /** + * Method used to place intern walls (opposite of border walls), we place walls using a random value and a + * probability and where there is no walls or where the position haven't a lock + * @see LockGridFactoryBuilder#getIllusionNumberWallNeighbour(Point) + */ + @Override + protected void initPlaceInternWall() { + for (int i = 1; i < getGrid().getRow() - 1; i++) { + for (int j = 1; j < getGrid().getColumn() - 1; j++) { + if(Math.random() >= wallProbability){ + Point point = new Point(i,j); + if(getIllusionNumberWallNeighbour(point) <= 3){ + getGrid().getBoard().get(point).setB(new Wall()); + } + else{ + getGrid().getBoard().get(point).setB(new AbstractBox()); + getGrid().getBoard().get(point).getB().setLock(true); + } + } + } + } + } + + /** + * Simply place player randomly where it's possible + */ + @Override + public void initPlacePlayers() { + Random random = new Random(); + Box boxTargeted; + Player playerTargeted; + Point point; + for (Player player: getGrid().getPlayers()) { + do{ + int i = random.nextInt(1,getGrid().getRow() - 1); + int j = random.nextInt(1,getGrid().getColumn() - 1); + point = new Point(i,j); + Pair pairTargeted = getGrid().getBoard().get(point); + boxTargeted = pairTargeted.getB(); + playerTargeted = pairTargeted.getA(); + }while(playerTargeted != null || !getGrid().isNeutralBox(boxTargeted)); + getGrid().getBoard().get(point).setA(player); + player.setPosition(point); + } + } + + /** + * A locked place is used to try to avoid player to be blocked when playing, + * A locked place can't have a wall on it + * @param point the position where we want to place a new wall + * @return number of walls and locked place around {@code position} + */ + private int getIllusionNumberWallNeighbour(Point point){ + int countWall = 0; + for (int deltaRow = -1; deltaRow <= 1; deltaRow++){ + for (int deltaColomn = -1; deltaColomn <= 1; deltaColomn++) { + Point neighbour = new Point(point.getA() + deltaRow, point.getB() + deltaColomn); + if (getGrid().boardPositionIsValid(neighbour)) { + Box box = getGrid().getBoard().get(neighbour).getB(); + if (box != null) { + if (box instanceof Wall || box.isLock()) { + countWall++; + } + } + } + } + } + return countWall; + } +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/grid/build/package-info.java b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/build/package-info.java new file mode 100644 index 0000000..ec24a12 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/build/package-info.java @@ -0,0 +1,4 @@ +/** + * Package containing all about Grid construction + */ +package fr.lnl.game.server.games.grid.build; \ No newline at end of file diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/AbstractBox.java b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/AbstractBox.java new file mode 100644 index 0000000..44c3f94 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/AbstractBox.java @@ -0,0 +1,25 @@ +package fr.lnl.game.server.games.grid.elements; + +/** + * AbstractBox is instantiable (not an abstract class), but when it's the case, instance doesn't represent anything, + * it's only to see if there is a lock on this position or not + */ +public class AbstractBox implements Box { + + boolean lock; + + public AbstractBox(){ + lock = false; + } + + @Override + public void setLock(boolean lock) { + this.lock = lock; + } + + @Override + public boolean isLock() { + return lock; + } +} + diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/Bomb.java b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/Bomb.java new file mode 100644 index 0000000..ca72f0e --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/Bomb.java @@ -0,0 +1,65 @@ +package fr.lnl.game.server.games.grid.elements; + +import fr.lnl.game.server.games.Game; +import fr.lnl.game.server.games.grid.Grid; +import fr.lnl.game.server.games.player.Player; +import fr.lnl.game.server.utils.Point; + +/** + * Bomb are elements which explode when someone walks on it or after a countdown, the explosion area is on multiple cases + */ +public class Bomb extends Explosive implements CountdownBox { + + private final Game game; + /** + * Timer before explosion + */ + private int counter = 5; + /** + * Explosion size, size is circle, not square + */ + private static final int EXPLOSION_SIZE = 2; + + public Bomb(Point point, Game game) { + super(game.getCurrentPlayer(), point); + this.game = game; + counter = counter * game.getPlayers().size(); + } + + protected void explode(Grid grid) { + for(int i = -EXPLOSION_SIZE; i < EXPLOSION_SIZE; i++) { + for(int j = -EXPLOSION_SIZE; j < EXPLOSION_SIZE; j++) { + if(pythagoras(i, j) <= EXPLOSION_SIZE) { // recherche en cercle, pas en carré + Point position = new Point(point.getA() + i, point.getB() + j); + if(grid.boardPositionIsValid(position)) { + Player player = grid.getBoard().get(position).getA(); + if(player != null) + player.decrementEnergy(player.getClassPlayer().getPenaltyBomb()); + } + } + } + } + super.explode(grid); + } + + /** + * When the timer (counter) goes down to 0, the bomb explode + * @see CountdownBox#update() + */ + @Override + public void update() { + counter--; + if(counter == 0) { + explode(game.getGrid()); + } + } + + /** + * @param a adjacent side of a triangle + * @param b opposite side of a triangle + * @return Pythagoras' theorem value + */ + public double pythagoras(double a, double b) { + return Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2)); + } +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/Box.java b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/Box.java new file mode 100644 index 0000000..3e7b5f4 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/Box.java @@ -0,0 +1,12 @@ +package fr.lnl.game.server.games.grid.elements; + +public interface Box { + + /** + * @return true if this box is locked (can't place wall on this position) + * @see fr.lnl.game.server.games.grid.build.LockGridFactoryBuilder + */ + boolean isLock(); + + void setLock(boolean lock); +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/CountdownBox.java b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/CountdownBox.java new file mode 100644 index 0000000..0fbdbe2 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/CountdownBox.java @@ -0,0 +1,13 @@ +package fr.lnl.game.server.games.grid.elements; + +/** + * A box implemented by CountdownBox is a box which do an action a certain time after being placed + */ +public interface CountdownBox { + + /** + * Call at each game tick (After a player do an action) + */ + void update(); + +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/EnergyBall.java b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/EnergyBall.java new file mode 100644 index 0000000..5d7e41f --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/EnergyBall.java @@ -0,0 +1,34 @@ +package fr.lnl.game.server.games.grid.elements; + +import fr.lnl.game.server.games.grid.Grid; +import fr.lnl.game.server.games.player.Player; +import fr.lnl.game.server.utils.Point; + +/** + * An EnergyBall is a box which give back a bit of player energy after it walks on the ball + */ +public class EnergyBall extends AbstractBox implements InteractiveBox{ + + /** + * Increment energy of player who walks on this element + * @param grid Game's grid + * @param player the player who walks on this element + * @param position position of this element on the grid + * @see InteractiveBox#interact(Grid, Player, Point) + */ + @Override + public void interact(Grid grid, Player player, Point position) { + player.incrementEnergy(player.getClassPlayer().getGainEnergy()); + grid.getBoard().get(position).setB(null); + } + + /** + * Used by tests + * @param obj the object to compare + * @return true if obj is an instance of EnergyBall, false otherwise + */ + @Override + public boolean equals(Object obj) { + return obj instanceof EnergyBall; + } +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/Explosive.java b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/Explosive.java new file mode 100644 index 0000000..fad2c94 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/Explosive.java @@ -0,0 +1,50 @@ +package fr.lnl.game.server.games.grid.elements; + +import fr.lnl.game.server.games.grid.Grid; +import fr.lnl.game.server.games.player.Player; +import fr.lnl.game.server.utils.Point; + +/** + * Super class of {@link Bomb} and {@link Mine} + */ +public abstract class Explosive extends AbstractBox implements InteractiveBox { + + /** + * Position of the explosive + */ + protected final Point point; + /** + * Owner of the explosive + */ + protected final Player player; + + public Explosive(Player player, Point point){ + this.player = player; + this.point = point; + } + + /** + * Decrement energy of the player who walks on this element + * @param grid Game's grid + * @param player the player who walks on this element + * @param position position of this element on the grid + * @see InteractiveBox#interact(Grid, Player, Point) + * @see Explosive#interact(Grid, Player, Point) + */ + @Override + public void interact(Grid grid, Player player, Point position) { + explode(grid); + } + + /** + * Apply damage to players and delete this object + * @param grid game's grid + */ + protected void explode(Grid grid) { + grid.getBoard().get(point).setB(null); + } + + public Player getPlayer() { + return player; + } +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/InteractiveBox.java b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/InteractiveBox.java new file mode 100644 index 0000000..4c08e31 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/InteractiveBox.java @@ -0,0 +1,20 @@ +package fr.lnl.game.server.games.grid.elements; + +import fr.lnl.game.server.games.grid.Grid; +import fr.lnl.game.server.games.player.Player; +import fr.lnl.game.server.utils.Point; + +/** + * A box implemented by InteractiveBox is a box which do an action when someone walks on it + */ +public interface InteractiveBox { + + /** + * Call when a player walk on it + * @param grid Game's grid + * @param player the player who walks on this element + * @param position position of this element on the grid + */ + void interact(Grid grid, Player player, Point position); + +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/Mine.java b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/Mine.java new file mode 100644 index 0000000..bfe8f8b --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/Mine.java @@ -0,0 +1,23 @@ +package fr.lnl.game.server.games.grid.elements; + +import fr.lnl.game.server.games.grid.Grid; +import fr.lnl.game.server.games.player.Player; +import fr.lnl.game.server.utils.Point; + +/** + * A mine is an element which explose when someone walks on it, the explosion area is on 1 case only + */ +public class Mine extends Explosive{ + + public Mine(Player player, Point point) { + super(player, point); + } + + @Override + protected void explode(Grid grid) { + Player player = grid.getBoard().get(point).getA(); + if(player != null) + player.decrementEnergy(player.getClassPlayer().getPenaltyMine()); + super.explode(grid); + } +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/Wall.java b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/Wall.java new file mode 100644 index 0000000..7747ce2 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/Wall.java @@ -0,0 +1,17 @@ +package fr.lnl.game.server.games.grid.elements; + +/** + * A wall is an intraversable object + */ +public class Wall extends AbstractBox { + + /** + * Used by tests + * @param obj the object to compare + * @return true if obj is an instance of wall, false otherwise + */ + @Override + public boolean equals(Object obj) { + return obj instanceof Wall; + } +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/package-info.java b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/package-info.java new file mode 100644 index 0000000..12e41c9 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/elements/package-info.java @@ -0,0 +1,4 @@ +/** + * Package containing all the elements that can be arranged in a grid + */ +package fr.lnl.game.server.games.grid.elements; \ No newline at end of file diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/grid/package-info.java b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/package-info.java new file mode 100644 index 0000000..bcadaf0 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/grid/package-info.java @@ -0,0 +1,4 @@ +/** + * Package containing all about Grid components + */ +package fr.lnl.game.server.games.grid; \ No newline at end of file diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/package-info.java b/livraison/server/src/main/java/fr/lnl/game/server/games/package-info.java new file mode 100644 index 0000000..1cd178d --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/package-info.java @@ -0,0 +1,4 @@ +/** + * Game package, contains all classes and sub-packages mainly related game works + */ +package fr.lnl.game.server.games; \ No newline at end of file diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/player/AbstractPlayer.java b/livraison/server/src/main/java/fr/lnl/game/server/games/player/AbstractPlayer.java new file mode 100644 index 0000000..43cdad1 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/player/AbstractPlayer.java @@ -0,0 +1,134 @@ +package fr.lnl.game.server.games.player; + +import fr.lnl.game.server.games.action.Action; +import fr.lnl.game.server.games.action.ReunionSameAction; +import fr.lnl.game.server.games.weapon.Weapon; +import fr.lnl.game.server.utils.Point; + +import java.util.ArrayList; +import java.util.List; + +public abstract class AbstractPlayer implements Player { + + private final int id; + private Point position; + private int energy; + private Weapon weapon; + private boolean shieldDeploy; + private List actions; + private final ClassPlayer classPlayer; + + public AbstractPlayer(Integer id, Point position, boolean shieldDeploy, ClassPlayer classPlayer) { + this.id = id; + this.classPlayer = classPlayer; + this.energy = classPlayer.getEnergy(); + this.weapon = classPlayer.getWeapon(); + this.shieldDeploy = shieldDeploy; + this.position = position; + } + + /** + * + * @return a list of {@link ReunionSameAction} which groups the same types of actions together. + * It is used by the player action choice strategy + */ + @Override + public List generateAvailableActions() { + List actions = new ArrayList<>(); + for (Action a : getActions()) { + ReunionSameAction reunionFilter = actions.stream() + .filter(r -> r.getActionName().equals(a.getClass().getSimpleName())) + .findFirst() + .orElse(null); + if(reunionFilter != null){ + reunionFilter.addAction(a); + } + else{ + actions.add(new ReunionSameAction(a.getClass().getSimpleName(),a)); + } + } + return actions; + } + + @Override + public boolean isAlive(){ + return energy > 0; + } + + @Override + public int getId() { + return id; + } + + @Override + public int getEnergy() { + return energy; + } + + @Override + public Weapon getWeapon() { + return weapon; + } + + @Override + public boolean isShieldDeploy() { + return shieldDeploy; + } + + @Override + public void setEnergy(int energy) { + this.energy = energy; + } + + @Override + public void setShieldDeploy(boolean shieldDeploy) { + this.shieldDeploy = shieldDeploy; + } + + @Override + public void setWeapon(Weapon weapon) { + this.weapon = weapon; + } + + @Override + public List getActions() { + return actions; + } + + @Override + public void setActions(List actions){ + this.actions = actions; + } + + @Override + public ClassPlayer getClassPlayer() { + return classPlayer; + } + + @Override + public Point getPosition() { + return position; + } + + + @Override + public void setPosition(/* NotNull */ Point position){ + if(position == null){ + throw new IllegalArgumentException("Position is null"); + } + this.position = position; + } + + @Override + public void decrementEnergy(int energy){ + if(!isShieldDeploy()){ + this.energy -= energy; + } + shieldDeploy = false; + } + + @Override + public void incrementEnergy(int energy){ + this.energy += energy; + } +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/player/ClassPlayer.java b/livraison/server/src/main/java/fr/lnl/game/server/games/player/ClassPlayer.java new file mode 100644 index 0000000..669aae9 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/player/ClassPlayer.java @@ -0,0 +1,86 @@ +package fr.lnl.game.server.games.player; + +import fr.lnl.game.server.games.weapon.Firearm; +import fr.lnl.game.server.games.weapon.Weapon; + +/** + * ClassPlayer contains all data about the cost of an action or the cost of a damage + */ +public enum ClassPlayer { + + DEFAULT(800, 25, 20, 30, 40, 10, 80, 40, 20, 15, new Firearm()), + TANK(1000, 20, 20, 17, 23, 13, 80, 27, 30, 22, new Firearm()), + DPS(800, 25, 16, 15, 20, 10, 80, 40, 40, 30, new Firearm()), + SUPPORT(600, 25, 20, 11, 15, 7, 80, 45, 45, 35, new Firearm()); + private final int energy; + private final int shieldCost; + private final int shootCost; + private final int mineCost; + private final int bombCost; + private final int moveCost; + private final int gainEnergy; + private final int penaltyShoot; + private final int penaltyBomb; + private final int penaltyMine; + private final Weapon weapon; + + + ClassPlayer(int energy, int shieldCost, int shootCost, int mineCost, int bombCost, int moveCost, + int gainEnergy, int penaltyShoot, int penaltyBomb, int penaltyMine, Weapon weapon){ + this.energy = energy; + this.shieldCost = shieldCost; + this.shootCost = shootCost; + this.mineCost = mineCost; + this.bombCost = bombCost; + this.moveCost = moveCost; + this.gainEnergy = gainEnergy; + this.penaltyShoot = penaltyShoot; + this.penaltyBomb = penaltyBomb; + this.penaltyMine = penaltyMine; + this.weapon = weapon; + } + + public int getEnergy() { + return energy; + } + + public int getShieldCost() { + return shieldCost; + } + + public int getShootCost() { + return shootCost; + } + + public int getMineCost() { + return mineCost; + } + + public int getBombCost() { + return bombCost; + } + + public int getMoveCost() { + return moveCost; + } + + public int getGainEnergy() { + return gainEnergy; + } + + public int getPenaltyShoot() { + return penaltyShoot; + } + + public int getPenaltyBomb() { + return penaltyBomb; + } + + public int getPenaltyMine() { + return penaltyMine; + } + + public Weapon getWeapon() { + return weapon; + } +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/player/ComputerPlayer.java b/livraison/server/src/main/java/fr/lnl/game/server/games/player/ComputerPlayer.java new file mode 100644 index 0000000..8c525bf --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/player/ComputerPlayer.java @@ -0,0 +1,39 @@ +package fr.lnl.game.server.games.player; + +import fr.lnl.game.server.games.Game; +import fr.lnl.game.server.games.action.Action; +import fr.lnl.game.server.games.action.Nothing; +import fr.lnl.game.server.utils.Point; + +/** + * Super class of all Computer players + */ +public abstract class ComputerPlayer extends AbstractPlayer { + + public ComputerPlayer(Integer id, Point point, ClassPlayer classPlayer) { + super(id, point, false, classPlayer); + } + + /** + * Call when an AI need to choose an action to execute + * @return the chosen action + */ + public Action choseAction(Game game){ + Action action; + switch (getActions().size()){ + case 0 -> action = new Nothing(); + case 1 -> action = getActions().get(0); + default -> { + return strategy(game); + } + } + return action; + } + + /** + * + * Method belonging to classes which extend this class to define the specific strategy of the player + * @return the chosen action between all available + */ + public abstract Action strategy(Game game); +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/player/HumanPlayer.java b/livraison/server/src/main/java/fr/lnl/game/server/games/player/HumanPlayer.java new file mode 100644 index 0000000..f27e31e --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/player/HumanPlayer.java @@ -0,0 +1,21 @@ +package fr.lnl.game.server.games.player; + +import fr.lnl.game.server.utils.Point; + +/** + * Instance of Human Player.
          + * A human player choose an action to execute by using mouse or keyboard.
          + * Human Player don't implement choseAction cause this method is executed on client part + */ +public class HumanPlayer extends AbstractPlayer { + + public HumanPlayer(Integer id, Point point, ClassPlayer classPlayer) { + super(id, point,false, classPlayer); + } + + + @Override + public String toString() { + return "Human"; + } +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/player/Player.java b/livraison/server/src/main/java/fr/lnl/game/server/games/player/Player.java new file mode 100644 index 0000000..c53b44a --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/player/Player.java @@ -0,0 +1,62 @@ +package fr.lnl.game.server.games.player; + +import fr.lnl.game.server.games.action.Action; +import fr.lnl.game.server.games.action.ReunionSameAction; +import fr.lnl.game.server.games.weapon.Weapon; +import fr.lnl.game.server.utils.Point; + +import java.util.List; + +public interface Player { + + List generateAvailableActions(); + + Point getPosition(); + + /** + * + * @return true if this player is Alive, false otherwise + */ + boolean isAlive(); + + int getId(); + + int getEnergy(); + + Weapon getWeapon(); + + /** + * + * @return true if this player has his shield activated, false otherwise + */ + boolean isShieldDeploy(); + + void setEnergy(int energy); + + void setShieldDeploy(boolean shieldDeploy); + + void setWeapon(Weapon weapon); + + List getActions(); + + void setActions(List actions); + + ClassPlayer getClassPlayer(); + + void setPosition(Point position); + + /** + * + * Call by the implementing classes {@link fr.lnl.game.server.games.action.Action} to withdraw + * a certain number of energy from a player + */ + void decrementEnergy(int energy); + + /** + * + * Call by the implementing classes {@link fr.lnl.game.server.games.action.Action} to add + * a certain number of energy from a player + */ + void incrementEnergy(int energy); + +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/player/RandomComputerPlayer.java b/livraison/server/src/main/java/fr/lnl/game/server/games/player/RandomComputerPlayer.java new file mode 100644 index 0000000..d0be3d7 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/player/RandomComputerPlayer.java @@ -0,0 +1,33 @@ +package fr.lnl.game.server.games.player; + +import fr.lnl.game.server.games.Game; +import fr.lnl.game.server.games.action.Action; +import fr.lnl.game.server.utils.Point; + +import java.util.Random; + +public class RandomComputerPlayer extends ComputerPlayer { + + public RandomComputerPlayer(Integer id, Point point, ClassPlayer classPlayer) { + super(id,point, classPlayer); + } + + /** + * Choose an action fully randomly + * @return an action between all available + */ + @Override + public Action strategy(Game game) { + Action action = null; + Random random = new Random(); + while (action == null || !action.isPossible()) { + action = getActions().get(random.nextInt(0, getActions().size())); + } + return action; + } + + @Override + public String toString() { + return "Random"; + } +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/player/StrategyComputerPlayer.java b/livraison/server/src/main/java/fr/lnl/game/server/games/player/StrategyComputerPlayer.java new file mode 100644 index 0000000..ce20ca7 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/player/StrategyComputerPlayer.java @@ -0,0 +1,138 @@ +package fr.lnl.game.server.games.player; + +import fr.lnl.game.server.games.Game; +import fr.lnl.game.server.games.action.*; +import fr.lnl.game.server.games.grid.elements.Box; +import fr.lnl.game.server.games.grid.elements.EnergyBall; +import fr.lnl.game.server.games.grid.elements.Explosive; +import fr.lnl.game.server.utils.Point; + +import java.util.List; +import java.util.Random; + +public class StrategyComputerPlayer extends ComputerPlayer { + + public StrategyComputerPlayer(Integer id, Point point, ClassPlayer classPlayer) { + super(id,point, classPlayer); + } + + /** + * Choose an action following the strategy + * @return an action between all available + */ + @Override + public Action strategy(Game game) { + Action deployShield = choseDeployShield(game); + if(deployShield != null){ + return deployShield; + } + + List actions = generateAvailableActions(); + Action shot = choseShot(actions,game); + if(shot != null){ + return shot; + } + Action move = choseMove(actions,game); + if(move != null){ + return move; + } + return choseExplosive(actions); + } + + + private Action choseExplosive(List actions){ + Random random = new Random(); + if(isInReunion(actions, DropBomb.class) || isInReunion(actions, DropMine.class)){ + List explosiveActions = extractReunionSameAction(actions, DropMine.class).getActions(); + explosiveActions.addAll(extractReunionSameAction(actions, DropBomb.class).getActions()); + return explosiveActions.get(random.nextInt(0, explosiveActions.size())); + } + else{ + return new Nothing(); + } + } + + private Action choseDeployShield(Game game){ + for (Player player : game.getPlayers()) { + List shot = new Shot(game,player).getValidPoint(); + boolean danger = shot.stream().anyMatch(p -> p.equals(getPosition())); + if(danger && (getEnergy() - getClassPlayer().getPenaltyShoot() <= 0)){ + return new DeployShield(this); + } + } + return null; + } + + private Action choseShot(List actions, Game game){ + if(isInReunion(actions, Shot.class)) { + ReunionSameAction reunion = extractReunionSameAction(actions, Shot.class); + List actionList = reunion.getActions(); + Action action = actionList.get(0); + if (actionList.size() > 1) { + for (int i = 1; i < actionList.size(); i++) { + Point point = actionList.get(i).getPoint(); + if (game.getGrid().getGridPlayer(point).getEnergy() < game.getGrid().getGridPlayer(action.getPoint()).getEnergy()) { + action = actionList.get(i); + } + } + } + return action; + } + return null; + } + + private Action choseMove(List actions, Game game){ + if(isInReunion(actions, Move.class)) { + ReunionSameAction reunion = extractReunionSameAction(actions, Move.class); + List actionList = reunion.getActions(); + for (Action value : actionList) { + Point point = value.getPoint(); + Box box = game.getGrid().getGridBox(point); + if (box instanceof EnergyBall) { + return value; + } + } + Random random = new Random(); + int value = random.nextInt(0, 2); + if (value == 0) { + Action action = null; + do { + Action move = actionList.get(random.nextInt(0, actionList.size())); + Box box = game.getGrid().getGridBox(move.getPoint()); + if (box instanceof Explosive) { + if (!(((Explosive) box).getPlayer().equals(this))) { + action = move; + } + else{ + if(actionList.stream().filter(a -> game.getGrid().getGridBox(a.getPoint()) instanceof Explosive).toList().size() == + actionList.size()){ + action = move; + } + } + } + else{ + action = move; + } + } while (action == null); + return action; + } + else{ + return choseExplosive(actions); + } + } + return null; + } + + public boolean isInReunion(List actions, Class clazz){ + return actions.stream().anyMatch(r -> r.getActionName().equals(clazz.getSimpleName())); + } + + public ReunionSameAction extractReunionSameAction(List actions, Class clazz){ + return actions.stream().filter(r -> r.getActionName().equals(clazz.getSimpleName())).findFirst().get(); + } + + @Override + public String toString() { + return "AI"; + } +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/player/package-info.java b/livraison/server/src/main/java/fr/lnl/game/server/games/player/package-info.java new file mode 100644 index 0000000..c8ab6a4 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/player/package-info.java @@ -0,0 +1,4 @@ +/** + * Package storing all players classes and as well AI behavior + */ +package fr.lnl.game.server.games.player; \ No newline at end of file diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/weapon/Firearm.java b/livraison/server/src/main/java/fr/lnl/game/server/games/weapon/Firearm.java new file mode 100644 index 0000000..4c054a5 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/weapon/Firearm.java @@ -0,0 +1,30 @@ +package fr.lnl.game.server.games.weapon; + +public class Firearm implements Weapon{ + + int bullet; + int horizontalDistance; + int verticalDistance; + + public Firearm(){ + this.bullet = 10; + this.horizontalDistance = 3; + this.verticalDistance = 3; + } + + + @Override + public int getBullet() { + return this.bullet; + } + + @Override + public int getHorizontalDistance() { + return this.horizontalDistance; + } + + @Override + public int getVerticalDistance() { + return this.verticalDistance; + } +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/weapon/Weapon.java b/livraison/server/src/main/java/fr/lnl/game/server/games/weapon/Weapon.java new file mode 100644 index 0000000..fe9098b --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/weapon/Weapon.java @@ -0,0 +1,17 @@ +package fr.lnl.game.server.games.weapon; + +public interface Weapon { + + int getBullet(); + + /** + * @return distance a bullet can go horizontally + */ + int getHorizontalDistance(); + + /** + * @return distance a bullet can go vertically + */ + int getVerticalDistance(); + +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/games/weapon/package-info.java b/livraison/server/src/main/java/fr/lnl/game/server/games/weapon/package-info.java new file mode 100644 index 0000000..3e78ae3 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/games/weapon/package-info.java @@ -0,0 +1,4 @@ +/** + * Package containing all bout player's weapons + */ +package fr.lnl.game.server.games.weapon; \ No newline at end of file diff --git a/livraison/server/src/main/java/fr/lnl/game/server/listener/AbstractModelListening.java b/livraison/server/src/main/java/fr/lnl/game/server/listener/AbstractModelListening.java new file mode 100644 index 0000000..3e71f58 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/listener/AbstractModelListening.java @@ -0,0 +1,22 @@ +package fr.lnl.game.server.listener; +import java.util.List; + +public abstract class AbstractModelListening implements ModelListener { + + protected List listeners; + + public void addListener(ModelListener e) { + this.listeners.add(e); + } + + public void removalListener(ModelListener e) { + this.listeners.remove(e); + } + + public void fireChange(){ + for(ModelListener e : listeners){ + e.updateModel(this); + } + } + +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/listener/ModelListener.java b/livraison/server/src/main/java/fr/lnl/game/server/listener/ModelListener.java new file mode 100644 index 0000000..2f98645 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/listener/ModelListener.java @@ -0,0 +1,13 @@ +package fr.lnl.game.server.listener; + +/** + * Model implemented by {@link AbstractModelListening} + */ +public interface ModelListener { + + /** + * this method is call everytime, an action on the view forces a controller to sens an update to model + * @param obj can be used to send data to model + */ + void updateModel(Object obj); +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/listener/package-info.java b/livraison/server/src/main/java/fr/lnl/game/server/listener/package-info.java new file mode 100644 index 0000000..3da2992 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/listener/package-info.java @@ -0,0 +1,5 @@ +/** + * Package containing model of listener to implement + * Used by listeners in client module + */ +package fr.lnl.game.server.listener; \ No newline at end of file diff --git a/livraison/server/src/main/java/fr/lnl/game/server/package-info.java b/livraison/server/src/main/java/fr/lnl/game/server/package-info.java new file mode 100644 index 0000000..2a0d095 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/package-info.java @@ -0,0 +1,4 @@ +/** + * Server package + */ +package fr.lnl.game.server; \ No newline at end of file diff --git a/livraison/server/src/main/java/fr/lnl/game/server/utils/CrashException.java b/livraison/server/src/main/java/fr/lnl/game/server/utils/CrashException.java new file mode 100644 index 0000000..90aec38 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/utils/CrashException.java @@ -0,0 +1,14 @@ +package fr.lnl.game.server.utils; + +/** + * Represent an unrecoverable error in the program, force program to stop + */ +public class CrashException extends RuntimeException { + + public CrashException(String message, Throwable cause) { + super(message, cause); + } + + + +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/utils/ErrorMessage.java b/livraison/server/src/main/java/fr/lnl/game/server/utils/ErrorMessage.java new file mode 100644 index 0000000..88c7668 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/utils/ErrorMessage.java @@ -0,0 +1,14 @@ +package fr.lnl.game.server.utils; + +/** + * Contain everything related to error messages, theirs errors are the fault of the end-user (like we demand an integer + * and user give us a floating point number + * Theirs error doesn't cause the program to stop, it'll demand a correct value + */ +public class ErrorMessage { + + /** + * Error given to end-user when it give us a non integer or float value + */ + public static final String Entry_Error_Message = "\033[0;31mErreur de saisie\033[0m : "; +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/utils/Maths.java b/livraison/server/src/main/java/fr/lnl/game/server/utils/Maths.java new file mode 100644 index 0000000..78f1f0d --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/utils/Maths.java @@ -0,0 +1,63 @@ +package fr.lnl.game.server.utils; + +import java.util.Scanner; + +public class Maths { + + /** + * Convert entry to an integer + * @param entry given parameter + * @param scanner standard input, used if entry isn't correct + * @param error error message to display if entry isn't an Integer + * @return an Integer if entry is valid or when it'll valid + */ + public static int testInteger(String entry, Scanner scanner, String error) { + while (!isInteger(entry)) { + System.out.println(ErrorMessage.Entry_Error_Message + error); + entry = scanner.next(); + } + return Integer.parseInt(entry); + } + + /** + * Convert entry to a float + * @param entry given parameter + * @param scanner standard input, used if entry isn't correct + * @param error error message to display if entry isn't a float + * @return a float if entry is a valid or when it'll valid + */ + public static float testFloat(String entry, Scanner scanner, String error) { + while (!isFloat(entry)) { + System.out.println(ErrorMessage.Entry_Error_Message + error); + entry = scanner.next(); + } + return Integer.parseInt(entry); + } + + /** + * @param strNum entry + * @return true if {@code strNum} is a float, false otherwise + * @see Maths#testFloat(String, Scanner, String) + */ + public static boolean isFloat(String strNum) { + try { + float d = Float.parseFloat(strNum); + } catch (NumberFormatException | NullPointerException nfe) { + return false; + } + return true; + } + + /** + * @param strNum entry + * @return true if {@code strNum} is an Integer, false otherwise + */ + public static boolean isInteger(String strNum) { + try { + int d = Integer.parseInt(strNum); + } catch (NumberFormatException | NullPointerException nfe) { + return false; + } + return true; + } +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/utils/Pair.java b/livraison/server/src/main/java/fr/lnl/game/server/utils/Pair.java new file mode 100644 index 0000000..b575217 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/utils/Pair.java @@ -0,0 +1,59 @@ +package fr.lnl.game.server.utils; + +import java.util.Objects; + +/** + * Tuple associating storing two value of undefined type.
          + * Unlike Python, value in this Tuple can be modified (but the type of its new value need to be the same) + * @param first element of the tuple + * @param second element of the tuple + */ +public class Pair { + + private A a; + private B b; + + public Pair(A a, B b){ + this.a = a; + this.b = b; + } + + public A getA() { + return this.a; + } + + public B getB() { + return this.b; + } + + + public void setA(A a) { + this.a = a; + } + + public void setB(B b) { + this.b = b; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Pair point = (Pair) o; + return Objects.equals(a, point.a) && Objects.equals(b, point.b); + } + + /** + * Absolut useful when using HashMap or HashSet (or everything using hashCode to compare Objects + * @return object hash + */ + @Override + public int hashCode() { + return Objects.hash(a, b); + } + + @Override + public String toString() { + return "Pair[" + a + "," + b + ']'; + } +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/utils/Point.java b/livraison/server/src/main/java/fr/lnl/game/server/utils/Point.java new file mode 100644 index 0000000..cb567e7 --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/utils/Point.java @@ -0,0 +1,11 @@ +package fr.lnl.game.server.utils; + +/** + * Point extends from Pair, basically a simpler ways to use Pair when using grid position + */ +public class Point extends Pair { + + public Point(int a, int b) { + super(a, b); + } +} diff --git a/livraison/server/src/main/java/fr/lnl/game/server/utils/package-info.java b/livraison/server/src/main/java/fr/lnl/game/server/utils/package-info.java new file mode 100644 index 0000000..867df9b --- /dev/null +++ b/livraison/server/src/main/java/fr/lnl/game/server/utils/package-info.java @@ -0,0 +1,4 @@ +/** + * Package containing all utility classes + */ +package fr.lnl.game.server.utils; \ No newline at end of file diff --git a/livraison/server/src/main/java/module-info.java b/livraison/server/src/main/java/module-info.java new file mode 100644 index 0000000..5164c9c --- /dev/null +++ b/livraison/server/src/main/java/module-info.java @@ -0,0 +1,15 @@ +/** + * Server module, include every model classes + */ +module server { + exports fr.lnl.game.server; + exports fr.lnl.game.server.games; + exports fr.lnl.game.server.games.player; + exports fr.lnl.game.server.games.grid; + exports fr.lnl.game.server.games.weapon; + exports fr.lnl.game.server.games.action; + exports fr.lnl.game.server.utils; + exports fr.lnl.game.server.listener; + exports fr.lnl.game.server.games.grid.elements; + exports fr.lnl.game.server.games.grid.build; +} \ No newline at end of file diff --git a/livraison/server/src/test/java/fr/lnl/game/server/ActionPlayerTest.java b/livraison/server/src/test/java/fr/lnl/game/server/ActionPlayerTest.java new file mode 100644 index 0000000..1e2b7b9 --- /dev/null +++ b/livraison/server/src/test/java/fr/lnl/game/server/ActionPlayerTest.java @@ -0,0 +1,101 @@ +package fr.lnl.game.server; + +import fr.lnl.game.server.games.Game; +import fr.lnl.game.server.games.action.*; +import fr.lnl.game.server.games.grid.Grid; +import fr.lnl.game.server.games.grid.elements.Bomb; +import fr.lnl.game.server.games.player.ClassPlayer; +import fr.lnl.game.server.games.player.Player; +import fr.lnl.game.server.games.player.RandomComputerPlayer; +import fr.lnl.game.server.mock.Mock; +import fr.lnl.game.server.utils.Point; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.util.Arrays; +import java.util.List; + +public class ActionPlayerTest { + + private Grid grid; + private Game game; + + @BeforeEach + public void mock() { + List players = Arrays.asList(new RandomComputerPlayer(1,null, ClassPlayer.DEFAULT), + new RandomComputerPlayer(2,null, ClassPlayer.DEFAULT)); + Mock mock = new Mock(players); + this.grid = mock.grid; + this.game = mock.game; + Assertions.assertEquals(game.getPlayers().get(0), game.getCurrentPlayer()); + } + + @Test + public void moveActionTest() { + Action move = null; + Point oldPoint = game.getCurrentPlayer().getPosition(); + Direction4Axis savedDirection = null; + for(Direction4Axis direction : Direction4Axis.values()) { + try { + move = new Move(game, game.getCurrentPlayer(), direction); + savedDirection = direction; + break; + } catch (NotValidDirectionException ignored) {} + } + Assertions.assertNotNull(move); + move.doAction(); + Point newPoint = game.getCurrentPlayer().getPosition(); + Assertions.assertEquals(newPoint, + new Point(oldPoint.getA() + savedDirection.getDeltaX(), + oldPoint.getB() + savedDirection.getDeltaY() + ) + ); + } + + @Test + public void DeployShieldTest() { + Player player = game.getCurrentPlayer(); + Assertions.assertFalse(player.isShieldDeploy()); + Action action = new DeployShield(player); + action.doAction(); + Assertions.assertTrue(player.isShieldDeploy()); + } + + @Test + public void shotActionTest(){ + Action shot = null; + for(Direction4Axis direction : Direction4Axis.values()) { + try { + shot = new Shot(game, game.getCurrentPlayer(), direction); + break; + } catch (NoMoreBulletInWeaponException | NotValidDirectionException ignored) {} + } + Assertions.assertNotNull(shot); + Player otherPlayer = game.getPlayers().get(1); + int currentEnergyOtherPlayer = otherPlayer.getEnergy(); + int currentEnergyCurrentPlayer = game.getCurrentPlayer().getEnergy(); + shot.doAction(); + Assertions.assertEquals(currentEnergyCurrentPlayer - game.getCurrentPlayer().getClassPlayer().getShootCost(), game.getCurrentPlayer().getEnergy()); + Assertions.assertEquals(currentEnergyOtherPlayer - otherPlayer.getClassPlayer().getPenaltyShoot(), otherPlayer.getEnergy()); + } + + @Test + public void dropBombActionTest() { + Player player = game.getCurrentPlayer(); + Action action = null; + Direction8Axis savedDirection = null; + for(Direction8Axis direction : Direction8Axis.values()) { + try { + action = new DropBomb(game, game.getCurrentPlayer(), direction); + savedDirection = direction; + break; + } catch (NotValidDirectionException ignored) {} + } + Assertions.assertNotNull(action); + action.doAction(); + Point bombPosition = new Point(player.getPosition().getA() + savedDirection.getDeltaX(), player.getPosition().getB() + savedDirection.getDeltaY()); + Assertions.assertTrue(game.getGrid().getBoard().get(bombPosition).getB() instanceof Bomb); + } + +} diff --git a/livraison/server/src/test/java/fr/lnl/game/server/GridTest.java b/livraison/server/src/test/java/fr/lnl/game/server/GridTest.java new file mode 100644 index 0000000..14604d6 --- /dev/null +++ b/livraison/server/src/test/java/fr/lnl/game/server/GridTest.java @@ -0,0 +1,83 @@ +package fr.lnl.game.server; + +import fr.lnl.game.server.games.Game; +import fr.lnl.game.server.games.grid.Grid; +import fr.lnl.game.server.games.grid.elements.Box; +import fr.lnl.game.server.games.grid.elements.EnergyBall; +import fr.lnl.game.server.games.grid.elements.Wall; +import fr.lnl.game.server.games.player.ClassPlayer; +import fr.lnl.game.server.games.player.Player; +import fr.lnl.game.server.games.player.RandomComputerPlayer; +import fr.lnl.game.server.mock.Mock; +import fr.lnl.game.server.utils.Pair; +import fr.lnl.game.server.utils.Point; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.util.Arrays; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class GridTest { + + private Grid grid; + private Game game; + + @BeforeEach + public void mock() { + List players = Arrays.asList(new RandomComputerPlayer(1,null, ClassPlayer.DEFAULT), + new RandomComputerPlayer(2,null, ClassPlayer.DEFAULT)); + Mock mock = new Mock(players); + grid = mock.grid; + game = mock.game; + } + + @Test + public void testGrid() { + // test Grid#initGrid() + assertEquals(new Wall(), grid.getBoard().get(new Point(0,0)).getB()); + assertEquals(new Wall(), grid.getBoard().get(new Point(0, grid.getColumn() - 1)).getB()); + assertEquals(new Wall(), grid.getBoard().get(new Point(grid.getRow() - 1, 0)).getB()); + assertEquals(new Wall(), grid.getBoard().get(new Point(grid.getRow() - 1, grid.getColumn() - 1)).getB()); + // test placePlayersBRUT (mocked) + grid.getPlayers().forEach(p -> System.out.println(p.getId() + ": " + p.getPosition())); + assertEquals(grid.getPlayers().get(0), grid.getBoard().get(new Point(7, 7)).getA()); + assertEquals(grid.getPlayers().get(1), grid.getBoard().get(new Point(7, 8)).getA()); + // test placeEnergyBallBRUT (mocked) + assertEquals(new EnergyBall(), grid.getBoard().get(new Point(2, 3)).getB()); + assertEquals(new EnergyBall(), grid.getBoard().get(new Point(8, 10)).getB()); + } + + @Test + public void testLock() { + System.out.println("=================== GRID COMPLETE ===================="); + System.out.println(grid.toString()); + System.out.println("=================== GRID AVEC LOCK ==================="); + StringBuilder str = new StringBuilder(); + for (int i = 0; i < grid.getRow(); i++) { + str.append("\n"); + for (int j = 0; j < grid.getColumn(); j++) { + Pair value = grid.getBoard().get(new Point(i, j)); + if(value.getB() != null){ + if(value.getB().isLock()){ + str.append(" \033[0;35mL\033[0m"); + } + if(value.getB() instanceof Wall){ + str.append(" \033[0;32m□\033[0m"); + } + if(value.getB() instanceof EnergyBall){ + str.append(" \033[0;31mE\033[0m"); + } + } + else if(value.getA() != null){ + str.append(" \033[0;34mP\033[0m"); + } + else { + str.append(" \033[0;37m.\033[0m"); + } + } + } + System.out.println(str); + } +} diff --git a/livraison/server/src/test/java/fr/lnl/game/server/mock/Mock.java b/livraison/server/src/test/java/fr/lnl/game/server/mock/Mock.java new file mode 100644 index 0000000..e5fba08 --- /dev/null +++ b/livraison/server/src/test/java/fr/lnl/game/server/mock/Mock.java @@ -0,0 +1,22 @@ +package fr.lnl.game.server.mock; + +import fr.lnl.game.server.games.Game; +import fr.lnl.game.server.games.grid.Grid; +import fr.lnl.game.server.games.grid.build.GridFactoryBuilder; +import fr.lnl.game.server.games.player.Player; + +import java.util.List; + +public class Mock { + + public GridFactoryBuilder buildStrategy; + public Game game; + public Grid grid; + + public Mock(List players) { + this.buildStrategy = MockGridFactoryBuilder.create().gridDimensions(16, 16).wallProbability(0.80F).energyProbability(0.95F); + game = new Game(buildStrategy, players); + this.grid = game.getGrid(); + } + +} diff --git a/livraison/server/src/test/java/fr/lnl/game/server/mock/MockDisplayWinner.java b/livraison/server/src/test/java/fr/lnl/game/server/mock/MockDisplayWinner.java new file mode 100644 index 0000000..9ca73e8 --- /dev/null +++ b/livraison/server/src/test/java/fr/lnl/game/server/mock/MockDisplayWinner.java @@ -0,0 +1,10 @@ +package fr.lnl.game.server.mock; + +import fr.lnl.game.server.listener.AbstractModelListening; + +public class MockDisplayWinner extends AbstractModelListening { + @Override + public void updateModel(Object obj) { + + } +} diff --git a/livraison/server/src/test/java/fr/lnl/game/server/mock/MockGridFactoryBuilder.java b/livraison/server/src/test/java/fr/lnl/game/server/mock/MockGridFactoryBuilder.java new file mode 100644 index 0000000..e4517ed --- /dev/null +++ b/livraison/server/src/test/java/fr/lnl/game/server/mock/MockGridFactoryBuilder.java @@ -0,0 +1,41 @@ +package fr.lnl.game.server.mock; + +import fr.lnl.game.server.games.grid.Grid; +import fr.lnl.game.server.games.grid.build.GridFactoryBuilder; +import fr.lnl.game.server.games.grid.build.LockGridFactoryBuilder; +import fr.lnl.game.server.games.grid.elements.EnergyBall; +import fr.lnl.game.server.games.grid.elements.Wall; +import fr.lnl.game.server.utils.Point; + +public class MockGridFactoryBuilder extends LockGridFactoryBuilder { + + private MockGridFactoryBuilder() { + + } + + public static GridFactoryBuilder create() { + return new MockGridFactoryBuilder(); + } + + @Override + protected void initPlaceEnergyBall() { + grid.getBoard().get(new Point(2,3)).setB(new EnergyBall()); + grid.getBoard().get(new Point(8,10)).setB(new EnergyBall()); + } + + @Override + protected void initPlaceInternWall() { + grid.getBoard().get(new Point(3,6)).setB(new Wall()); + grid.getBoard().get(new Point(7,14)).setB(new Wall()); + grid.getBoard().get(new Point(10,7)).setB(new Wall()); + grid.getBoard().get(new Point(14,2)).setB(new Wall()); + } + + @Override + public void initPlacePlayers() { + grid.getBoard().get(new Point(7,7)).setA(grid.getPlayers().get(0)); + grid.getPlayers().get(0).setPosition(new Point(7, 7)); + grid.getBoard().get(new Point(7,8)).setA(grid.getPlayers().get(1)); + grid.getPlayers().get(1).setPosition(new Point(7, 8)); + } +} diff --git a/livraison/settings.gradle b/livraison/settings.gradle new file mode 100644 index 0000000..886ec9f --- /dev/null +++ b/livraison/settings.gradle @@ -0,0 +1,11 @@ +/* + * This file was generated by the Gradle 'init' task. + * + * The settings file is used to specify which projects to include in your build. + * + * Detailed information about configuring a multi-project build in Gradle can be found + * in the user manual at https://docs.gradle.org/7.0.1/userguide/multi_project_builds.html + */ + +rootProject.name = 'legot-neveu-lucas' +include(':client', ':server') diff --git a/livraison/startTerminal.bat b/livraison/startTerminal.bat new file mode 100644 index 0000000..f4ab07b --- /dev/null +++ b/livraison/startTerminal.bat @@ -0,0 +1,3 @@ +@echo off + +gradle :client:run --args="terminal human dps computerS tank" --console="plain" diff --git a/livraison/startTerminal.sh b/livraison/startTerminal.sh new file mode 100644 index 0000000..b5fc8e5 --- /dev/null +++ b/livraison/startTerminal.sh @@ -0,0 +1,3 @@ +#!/bin/sh +gradle --version +gradle :client:run --args="terminal human dps computerS tank" diff --git a/livraison/startWindow.bat b/livraison/startWindow.bat new file mode 100644 index 0000000..4e5f904 --- /dev/null +++ b/livraison/startWindow.bat @@ -0,0 +1,2 @@ +@echo off +gradle :client:run --args="window human dps computerS tank" --console="plain" diff --git a/livraison/startWindow.sh b/livraison/startWindow.sh new file mode 100644 index 0000000..67b83b6 --- /dev/null +++ b/livraison/startWindow.sh @@ -0,0 +1,3 @@ +#!/bin/sh +gradle --version +gradle :client:run --args="window human dps computerS tank"