From 8d11d07daec69360fb7cc6a5f53646c08fe826bf Mon Sep 17 00:00:00 2001 From: enimaloc Date: Wed, 13 Mar 2024 12:17:02 +0100 Subject: [PATCH 01/31] =?UTF-8?q?Fix:=20ajout=20de=20l'editor=20dans=20le?= =?UTF-8?q?=20sdevtools=20et=20affichage=20des=20=C3=A9l=C3=A9ments=20du?= =?UTF-8?q?=20devtools?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/fr/hashimiste/impl/Main.java | 6 +++--- .../fr/hashimiste/impl/gui/dev/DebugFrame.java | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/main/java/fr/hashimiste/impl/Main.java b/src/main/java/fr/hashimiste/impl/Main.java index 30c92df..3d0f907 100644 --- a/src/main/java/fr/hashimiste/impl/Main.java +++ b/src/main/java/fr/hashimiste/impl/Main.java @@ -61,6 +61,9 @@ public static void main(String[] args) throws Exception { Stockage stockage = new SQLStockage("org.sqlite.JDBC", "jdbc:sqlite:hashimiste.db"); recupererFenetreAsAfficher(propertiesFile, properties, stockage).setVisible(true); + if (DEVELOPMENT) { + new DebugFrame(stockage).setVisible(true); + } } /** @@ -73,9 +76,6 @@ public static void main(String[] args) throws Exception { */ private static Frame recupererFenetreAsAfficher(File propertiesFile, Properties properties, Stockage stockage) { JFrameTemplate frame = new ProfilSelection(propertiesFile, stockage); - if (DEVELOPMENT) { - new DebugFrame(stockage).setVisible(true); - } if (getProperty("profil", properties) == null) { return frame; } diff --git a/src/main/java/fr/hashimiste/impl/gui/dev/DebugFrame.java b/src/main/java/fr/hashimiste/impl/gui/dev/DebugFrame.java index 804095b..ee099c5 100644 --- a/src/main/java/fr/hashimiste/impl/gui/dev/DebugFrame.java +++ b/src/main/java/fr/hashimiste/impl/gui/dev/DebugFrame.java @@ -7,11 +7,15 @@ import fr.hashimiste.core.gui.JFrameTemplateProfil; import fr.hashimiste.core.utils.swing.ListRenderer; import fr.hashimiste.impl.data.sql.SQLStockage; +import fr.hashimiste.impl.gui.builder.Editor; import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; import javax.swing.event.ListSelectionEvent; import javax.swing.table.DefaultTableModel; import java.awt.*; +import java.io.File; import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; @@ -82,6 +86,16 @@ public DebugFrame(Stockage stockage) { panels.addTab("Data", panData); setupDataPanel(); + + panels.addTab("Editor", new JPanel()); + panels.addChangeListener(new ChangeListener() { + private JFrame builder = new Editor(new File("hashimiste.properties"), stockage, null); + + @Override + public void stateChanged(ChangeEvent e) { + builder.setVisible(panels.getSelectedIndex() == 2); + } + }); add(panels); } From e205b52e6122b6bac59a602b4f3dd8c46b980be4 Mon Sep 17 00:00:00 2001 From: Antoine Date: Thu, 11 Apr 2024 16:17:59 +0200 Subject: [PATCH 02/31] execution de l'utilitaire de reformation de code --- .../fr/hashimiste/core/data/Stockage.java | 12 +- .../fr/hashimiste/core/dev/Debuggable.java | 1 + .../hashimiste/core/gui/JFrameTemplate.java | 30 +- .../java/fr/hashimiste/core/jeu/Case.java | 3 - .../java/fr/hashimiste/core/jeu/CaseVide.java | 2 +- .../java/fr/hashimiste/core/jeu/Grille.java | 9 + src/main/java/fr/hashimiste/core/jeu/Ile.java | 1 + .../fr/hashimiste/core/jeu/Technique.java | 6 +- .../java/fr/hashimiste/core/utils/Assert.java | 4 +- .../core/utils/SizeComponentAdapter.java | 2 +- .../hashimiste/core/utils/UnionIleString.java | 9 +- .../core/utils/UnionIleTechnique.java | 8 +- .../core/utils/swing/ListRenderer.java | 2 +- .../impl/data/sql/filter/EqFilter.java | 2 +- .../impl/data/sql/joins/InnerJoin.java | 12 +- .../hashimiste/impl/gui/builder/Editor.java | 5 +- .../impl/gui/builder/GrilleBuilder.java | 18 +- .../impl/gui/component/GameComponent.java | 142 +++--- .../impl/gui/component/PreviewComponent.java | 2 +- .../hashimiste/impl/gui/dev/DebugFrame.java | 4 +- .../java/fr/hashimiste/impl/gui/jeu/Jeu.java | 38 +- .../fr/hashimiste/impl/gui/menu/Aventure.java | 20 +- .../hashimiste/impl/gui/theme/CandyTheme.java | 25 +- .../hashimiste/impl/gui/theme/DarkTheme.java | 25 +- .../hashimiste/impl/gui/theme/DebugTheme.java | 22 +- .../impl/gui/theme/DefaultTheme.java | 25 +- .../fr/hashimiste/impl/jeu/CaseVideImpl.java | 24 +- .../fr/hashimiste/impl/jeu/GrilleImpl.java | 55 +-- .../java/fr/hashimiste/impl/jeu/IleImpl.java | 71 ++- .../java/fr/hashimiste/impl/jeu/PontImpl.java | 28 +- .../impl/gui/menu/AventureTest.java | 9 +- .../fr/hashimiste/impl/gui/menu/MenuTest.java | 12 +- .../impl/gui/menu/ModeLibreTest.java | 9 +- .../impl/gui/menu/ParametreTest.java | 9 +- .../impl/gui/menu/ProfilSelectionTest.java | 6 +- .../impl/gui/menu/TechniqueTest.java | 9 +- .../fr/hashimiste/impl/gui/menu/TestMenu.java | 62 ++- .../java/fr/hashimiste/impl/jeu/AideTest.java | 47 +- .../fr/hashimiste/impl/jeu/TechniqueTest.java | 403 +++++++++--------- 39 files changed, 587 insertions(+), 586 deletions(-) diff --git a/src/main/java/fr/hashimiste/core/data/Stockage.java b/src/main/java/fr/hashimiste/core/data/Stockage.java index 9db29fb..8f01d88 100644 --- a/src/main/java/fr/hashimiste/core/data/Stockage.java +++ b/src/main/java/fr/hashimiste/core/data/Stockage.java @@ -24,9 +24,9 @@ public interface Stockage { /** * Charge une liste d'objets de type T à partir du stockage en utilisant des jointures et un filtre. * - * @param clazz la classe des objets à charger. + * @param clazz la classe des objets à charger. * @param jointures la liste des jointures à utiliser. - * @param filtre le filtre à utiliser. + * @param filtre le filtre à utiliser. * @return une liste d'objets de type T. */ List charger(Class clazz, List jointures, Filter filtre); @@ -34,7 +34,7 @@ public interface Stockage { /** * Charge une liste d'objets de type T à partir du stockage en utilisant des jointures. * - * @param clazz la classe des objets à charger. + * @param clazz la classe des objets à charger. * @param jointures la liste des jointures à utiliser. * @return une liste d'objets de type T. */ @@ -45,7 +45,7 @@ default List charger(Class clazz, List jointures) { /** * Charge une liste d'objets de type T à partir du stockage en utilisant un filtre. * - * @param clazz la classe des objets à charger. + * @param clazz la classe des objets à charger. * @param filtre le filtre à utiliser. * @return une liste d'objets de type T. */ @@ -66,7 +66,7 @@ default List charger(Class clazz) { /** * Récupère un objet de type T à partir du stockage en utilisant un filtre. * - * @param clazz la classe de l'objet à récupérer. + * @param clazz la classe de l'objet à récupérer. * @param filtre le filtre à utiliser. * @return un objet de type T. */ @@ -84,7 +84,7 @@ default T get(Class clazz, Filter filtre) { /** * Supprime des objets de type T du stockage en utilisant un filtre. * - * @param clazz la classe des objets à supprimer. + * @param clazz la classe des objets à supprimer. * @param filtre le filtre à utiliser. */ void supprimer(Class clazz, Filter filtre); diff --git a/src/main/java/fr/hashimiste/core/dev/Debuggable.java b/src/main/java/fr/hashimiste/core/dev/Debuggable.java index 24ad84e..2b0bf70 100644 --- a/src/main/java/fr/hashimiste/core/dev/Debuggable.java +++ b/src/main/java/fr/hashimiste/core/dev/Debuggable.java @@ -6,6 +6,7 @@ public interface Debuggable { /** * Récupère les informations de débogage. + * * @return les informations de débogage. */ String getDebugInfo(); diff --git a/src/main/java/fr/hashimiste/core/gui/JFrameTemplate.java b/src/main/java/fr/hashimiste/core/gui/JFrameTemplate.java index f23f779..b233827 100644 --- a/src/main/java/fr/hashimiste/core/gui/JFrameTemplate.java +++ b/src/main/java/fr/hashimiste/core/gui/JFrameTemplate.java @@ -3,11 +3,10 @@ import fr.hashimiste.core.data.Stockage; import fr.hashimiste.core.image.AppImage; import fr.hashimiste.impl.gui.dev.DebugFrame; -import fr.hashimiste.impl.gui.theme.DebugTheme; -import fr.hashimiste.impl.gui.theme.DefaultTheme; import fr.hashimiste.impl.gui.theme.CandyTheme; import fr.hashimiste.impl.gui.theme.DarkTheme; - +import fr.hashimiste.impl.gui.theme.DebugTheme; +import fr.hashimiste.impl.gui.theme.DefaultTheme; import javax.swing.*; import java.awt.*; @@ -44,7 +43,7 @@ protected JFrameTemplate(JFrameTemplate fenetreParente) { * Constructeur de JFrameTemplate. * * @param fenetreParente la fenêtre parente. - * @param dimension la taille de la fenêtre. + * @param dimension la taille de la fenêtre. */ protected JFrameTemplate(JFrameTemplate fenetreParente, Dimension dimension) { this(fenetreParente, fenetreParente.fichierProperties, fenetreParente.stockage, dimension); @@ -55,8 +54,8 @@ protected JFrameTemplate(JFrameTemplate fenetreParente, Dimension dimension) { * * @param fenetreParente la fenêtre parente. * @param fichierProperties le fichier de propriétés. - * @param stockage le système de stockage des données. - * @param size la taille de la fenêtre. + * @param stockage le système de stockage des données. + * @param size la taille de la fenêtre. */ protected JFrameTemplate(JFrame fenetreParente, File fichierProperties, Stockage stockage, Dimension size) { this.fenetreParente = fenetreParente; @@ -95,7 +94,7 @@ public void changerFenetre(JFrame window) { /** * Crée un bouton qui, lorsqu'il est cliqué, change la fenêtre actuelle pour une autre. * - * @param texte le texte du bouton. + * @param texte le texte du bouton. * @param fenetre la nouvelle fenêtre. * @return le bouton créé. */ @@ -106,7 +105,7 @@ protected JButton creerBoutton(String texte, JFrame fenetre) { /** * Crée un bouton avec une action lorsqu'il est cliqué. * - * @param texte le texte du bouton. + * @param texte le texte du bouton. * @param action l'action à exécuter lors du clic. * @return le bouton créé. */ @@ -117,9 +116,9 @@ protected JButton creerBoutton(String texte, Runnable action) { /** * Crée un bouton avec une action différente selon le bouton de la souris utilisé pour le clic. * - * @param texte le texte du bouton. - * @param cliqueDroit l'action à exécuter lors d'un clic droit. - * @param cliqueGauche l'action à exécuter lors d'un clic gauche. + * @param texte le texte du bouton. + * @param cliqueDroit l'action à exécuter lors d'un clic droit. + * @param cliqueGauche l'action à exécuter lors d'un clic gauche. * @return le bouton créé. */ protected JButton creerBoutton(String texte, Runnable cliqueDroit, Runnable cliqueGauche) { @@ -159,11 +158,10 @@ protected void appliquerTheme(JComponent... composants) { button.setBackground(theme.getDisabledButtonColor()); } button.setForeground(theme.getButtonTextColor()); - } else if (component instanceof JLabel ) { + } else if (component instanceof JLabel) { JLabel label = (JLabel) component; label.setForeground(theme.getTextColor()); - } else if (component instanceof JTextArea) - { + } else if (component instanceof JTextArea) { JTextArea textArea = (JTextArea) component; textArea.setForeground(theme.getTextColor()); } @@ -189,9 +187,9 @@ protected void rechargerTheme() { this.theme = DefaultTheme.INSTANCE; if (properties.getProperty("theme").equals("debug")) { this.theme = DebugTheme.INSTANCE; - }else if(properties.getProperty("theme").equals("candy")){ + } else if (properties.getProperty("theme").equals("candy")) { this.theme = CandyTheme.INSTANCE; - }else if(properties.getProperty("theme").equals("dark")){ + } else if (properties.getProperty("theme").equals("dark")) { this.theme = DarkTheme.INSTANCE; } appliquerTheme(composantStylise.toArray(new JComponent[0])); diff --git a/src/main/java/fr/hashimiste/core/jeu/Case.java b/src/main/java/fr/hashimiste/core/jeu/Case.java index 3abf6ae..8db6be1 100644 --- a/src/main/java/fr/hashimiste/core/jeu/Case.java +++ b/src/main/java/fr/hashimiste/core/jeu/Case.java @@ -32,7 +32,6 @@ public interface Case { * Renvoie le voisin dans la direction indiquée. * * @param d la direction du voisin cherché. - * * @return le voisin de la case dans la direction d. */ Case getVoisinCase(Direction d); @@ -41,7 +40,6 @@ public interface Case { * Renvoie l'île dans la direction indiquée. * * @param d la direction du voisin cherché. - * * @return l'île voisine de la case dans la direction d. */ Ile getVoisinIle(Direction d); @@ -50,7 +48,6 @@ public interface Case { * Indique si on peut traverser la case dans la direction donnée. * * @param d la direction dans laquelle la grille est parcourue. - * * @return -1 si on ne peut pas la traverser (pont perpendiculaire, ile complète, bordure), 0 si on peut continuer (pont parrallèle, case vide, ne devrait pas arriver), et un nombre entre 1 et 8 (île non complétée) */ int opParcours(Direction d); diff --git a/src/main/java/fr/hashimiste/core/jeu/CaseVide.java b/src/main/java/fr/hashimiste/core/jeu/CaseVide.java index 80fd84b..c231ffb 100644 --- a/src/main/java/fr/hashimiste/core/jeu/CaseVide.java +++ b/src/main/java/fr/hashimiste/core/jeu/CaseVide.java @@ -1,4 +1,4 @@ package fr.hashimiste.core.jeu; -public interface CaseVide extends Case{ +public interface CaseVide extends Case { } diff --git a/src/main/java/fr/hashimiste/core/jeu/Grille.java b/src/main/java/fr/hashimiste/core/jeu/Grille.java index d003eea..d3a7604 100644 --- a/src/main/java/fr/hashimiste/core/jeu/Grille.java +++ b/src/main/java/fr/hashimiste/core/jeu/Grille.java @@ -15,6 +15,7 @@ public interface Grille extends Identifiable { /** * Récupère une île à une position spécifique. + * * @param x la position x de l'île. * @param y la position y de l'île. * @return l'île à la position spécifiée. @@ -23,24 +24,28 @@ public interface Grille extends Identifiable { /** * Récupère la liste de toutes les îles. + * * @return la liste de toutes les îles. */ List getIles(); /** * Récupère les dimensions de la grille. + * * @return les dimensions de la grille. */ Dimension getDimension(); /** * Si une île doit figurer dans l'écran aventure + * * @return vrai si l'île doit figurer dans l'écran aventure, faux sinon. */ boolean estAventure(); /** * Récupère la liste de toutes les sauvegardes. + * * @param stockage le système de stockage des données. * @return la liste de toutes les sauvegardes. */ @@ -48,12 +53,14 @@ public interface Grille extends Identifiable { /** * Rafraîchit la liste des sauvegardes. + * * @param stockage le système de stockage des données. */ void rafraichirSauvegardes(Stockage stockage); /** * Vérifie si la grille est correcte. + * * @return vrai si la grille est correcte, faux sinon. */ boolean verification(); @@ -67,12 +74,14 @@ public interface Grille extends Identifiable { /** * Parcourt la grille à la recherche de l'île sur laquelle on peut appliquer une technique. + * * @return une Ile avec la technique qui peut s'y appliquer. */ UnionIleTechnique chercherIle(); /** * Récupère la difficulté de la grille. + * * @return la difficulté de la grille. */ Difficulte getDifficulte(); diff --git a/src/main/java/fr/hashimiste/core/jeu/Ile.java b/src/main/java/fr/hashimiste/core/jeu/Ile.java index fbf8368..9f3ad87 100644 --- a/src/main/java/fr/hashimiste/core/jeu/Ile.java +++ b/src/main/java/fr/hashimiste/core/jeu/Ile.java @@ -78,6 +78,7 @@ public interface Ile extends Identifiable, Case { /** * Récupère la région de la grille dans laquelle se trouve l'île. + * * @return Un string contenant la région (Nord, Sud...) */ String getRegion(); diff --git a/src/main/java/fr/hashimiste/core/jeu/Technique.java b/src/main/java/fr/hashimiste/core/jeu/Technique.java index c711aa8..7a2e511 100644 --- a/src/main/java/fr/hashimiste/core/jeu/Technique.java +++ b/src/main/java/fr/hashimiste/core/jeu/Technique.java @@ -133,13 +133,13 @@ public enum Technique { */ TECH_COMPL("Technique Égalité", "Si le nombre de ponts possibles de l'île est égale à sa valeur," + - " alors il faut ajouter tous ces ponts possibles.", + " alors il faut ajouter tous ces ponts possibles.", o -> { int n = o.getN(); int nbPoss = o.getNbPontPossible(); return n == nbPoss; }, - "../../../../../resources/images/logo_atlas.png"), + "../../../../../resources/images/logo_atlas.png"), /** * Technique vérifiant si une île est un 1 possédant uniquement un voisin qui n'est pas non plus un 1. */ @@ -218,7 +218,7 @@ public boolean test(Ile ile) { /** * Récupère l'url de l'image montrant un exemple de cette technique - * + * * @return l'url de l'image */ public String getUrl() { diff --git a/src/main/java/fr/hashimiste/core/utils/Assert.java b/src/main/java/fr/hashimiste/core/utils/Assert.java index c0ec93d..48a706d 100644 --- a/src/main/java/fr/hashimiste/core/utils/Assert.java +++ b/src/main/java/fr/hashimiste/core/utils/Assert.java @@ -13,6 +13,7 @@ private Assert() { /** * Vérifie qu'un objet n'est pas null. + * * @param o l'objet a vérifié. */ public static void nonNull(Object o) { @@ -21,7 +22,8 @@ public static void nonNull(Object o) { /** * Vérifie qu'un objet n'est pas null. - * @param o l'objet a vérifié. + * + * @param o l'objet a vérifié. * @param message le message d'erreur. */ public static void nonNull(Object o, String message) { diff --git a/src/main/java/fr/hashimiste/core/utils/SizeComponentAdapter.java b/src/main/java/fr/hashimiste/core/utils/SizeComponentAdapter.java index 1747d13..29044bb 100644 --- a/src/main/java/fr/hashimiste/core/utils/SizeComponentAdapter.java +++ b/src/main/java/fr/hashimiste/core/utils/SizeComponentAdapter.java @@ -19,7 +19,7 @@ public class SizeComponentAdapter extends ComponentAdapter { * * @param tailleParDefaut la taille par défaut de la fenêtre. * @param tailleComposantParDefaut la taille par défaut des composants. - * @param composants les composants à redimensionner. + * @param composants les composants à redimensionner. */ public SizeComponentAdapter(Dimension tailleParDefaut, Dimension tailleComposantParDefaut, JComponent... composants) { this.tailleParDefaut = tailleParDefaut; diff --git a/src/main/java/fr/hashimiste/core/utils/UnionIleString.java b/src/main/java/fr/hashimiste/core/utils/UnionIleString.java index fd5bde3..48afd07 100644 --- a/src/main/java/fr/hashimiste/core/utils/UnionIleString.java +++ b/src/main/java/fr/hashimiste/core/utils/UnionIleString.java @@ -1,7 +1,6 @@ package fr.hashimiste.core.utils; import fr.hashimiste.core.jeu.Ile; -import fr.hashimiste.core.jeu.Technique; /** * union d'une île et d'un string @@ -10,24 +9,26 @@ public class UnionIleString { private final Ile ileU; private final String strU; - public UnionIleString(Ile i, String s){ + public UnionIleString(Ile i, String s) { this.ileU = i; this.strU = s; } /** * Renvoie l'île de l'union + * * @return l'île de l'union */ - public Ile getIleU(){ + public Ile getIleU() { return this.ileU; } /** * Renvoie le string de l'union + * * @return le string de l'union */ - public String getStrU(){ + public String getStrU() { return this.strU; } diff --git a/src/main/java/fr/hashimiste/core/utils/UnionIleTechnique.java b/src/main/java/fr/hashimiste/core/utils/UnionIleTechnique.java index 39e4c78..6824bfc 100644 --- a/src/main/java/fr/hashimiste/core/utils/UnionIleTechnique.java +++ b/src/main/java/fr/hashimiste/core/utils/UnionIleTechnique.java @@ -10,24 +10,26 @@ public class UnionIleTechnique { private final Ile ileU; private final Technique techU; - public UnionIleTechnique(Ile i, Technique t){ + public UnionIleTechnique(Ile i, Technique t) { this.ileU = i; this.techU = t; } /** * Renvoie l'île de l'union + * * @return l'île de l'union */ - public Ile getIleU(){ + public Ile getIleU() { return this.ileU; } /** * Renvoie la technique de l'union + * * @return le technique de l'union */ - public Technique getTechU(){ + public Technique getTechU() { return this.techU; } diff --git a/src/main/java/fr/hashimiste/core/utils/swing/ListRenderer.java b/src/main/java/fr/hashimiste/core/utils/swing/ListRenderer.java index 0c0b76d..2dc7a3a 100644 --- a/src/main/java/fr/hashimiste/core/utils/swing/ListRenderer.java +++ b/src/main/java/fr/hashimiste/core/utils/swing/ListRenderer.java @@ -15,7 +15,7 @@ public class ListRenderer extends DefaultListCellRenderer { /** * Constructeur de ListRenderer. * - * @param clazz la classe des éléments de la liste. + * @param clazz la classe des éléments de la liste. * @param transformateur une fonction pour convertir les éléments de la liste en chaînes de caractères. */ public ListRenderer(Class clazz, Function transformateur) { diff --git a/src/main/java/fr/hashimiste/impl/data/sql/filter/EqFilter.java b/src/main/java/fr/hashimiste/impl/data/sql/filter/EqFilter.java index da8a619..3d73c57 100644 --- a/src/main/java/fr/hashimiste/impl/data/sql/filter/EqFilter.java +++ b/src/main/java/fr/hashimiste/impl/data/sql/filter/EqFilter.java @@ -13,7 +13,7 @@ public class EqFilter implements SQLFilter { * Constructeur de EqFilter. * * @param colonne le nom de la colonne sur laquelle appliquer le filtre. - * @param value la valeur à laquelle la colonne doit être égale. + * @param value la valeur à laquelle la colonne doit être égale. */ public EqFilter(String colonne, Object value) { this.colonne = colonne; diff --git a/src/main/java/fr/hashimiste/impl/data/sql/joins/InnerJoin.java b/src/main/java/fr/hashimiste/impl/data/sql/joins/InnerJoin.java index 5412385..40b327c 100644 --- a/src/main/java/fr/hashimiste/impl/data/sql/joins/InnerJoin.java +++ b/src/main/java/fr/hashimiste/impl/data/sql/joins/InnerJoin.java @@ -17,9 +17,9 @@ public class InnerJoin implements Join { /** * Constructeur de InnerJoin. * - * @param source le nom de la table source. + * @param source le nom de la table source. * @param colonneSource le nom de la colonne dans la table source. - * @param dest le nom de la table de destination. + * @param dest le nom de la table de destination. * @param colonneDest le nom de la colonne dans la table de destination. */ public InnerJoin(String source, String colonneSource, String dest, String colonneDest) { @@ -29,11 +29,11 @@ public InnerJoin(String source, String colonneSource, String dest, String colonn /** * Constructeur de InnerJoin. * - * @param source le nom de la table source. - * @param sourceAlias l'alias de la table source. + * @param source le nom de la table source. + * @param sourceAlias l'alias de la table source. * @param colonneSource le nom de la colonne dans la table source. - * @param dest le nom de la table de destination. - * @param destAlias l'alias de la table de destination. + * @param dest le nom de la table de destination. + * @param destAlias l'alias de la table de destination. * @param colonneDest le nom de la colonne dans la table de destination. */ public InnerJoin(String source, String sourceAlias, String colonneSource, String dest, String destAlias, String colonneDest) { diff --git a/src/main/java/fr/hashimiste/impl/gui/builder/Editor.java b/src/main/java/fr/hashimiste/impl/gui/builder/Editor.java index eec5dff..4d11f70 100644 --- a/src/main/java/fr/hashimiste/impl/gui/builder/Editor.java +++ b/src/main/java/fr/hashimiste/impl/gui/builder/Editor.java @@ -8,7 +8,6 @@ import fr.hashimiste.core.jeu.Ile; import fr.hashimiste.impl.data.sql.SQLStockage; import fr.hashimiste.impl.jeu.CaseVideImpl; -import fr.hashimiste.impl.jeu.IleImpl; import javax.swing.*; import javax.swing.filechooser.FileFilter; @@ -42,7 +41,7 @@ public class Editor extends JFrameTemplate { ); private final JButton butCharger = new JButton("Charger"); private final JButton butSauvegarder = new JButton("Sauvegarder"); -// private final JLabel labEstAventure = new JLabel("Aventure"); + // private final JLabel labEstAventure = new JLabel("Aventure"); private final JCheckBox checkEstAventure = new JCheckBox("Aventure"); private transient GrilleBuilder grille = new GrilleBuilder(); @@ -153,7 +152,7 @@ private void updateLayout() { for (int y = 0; y < grille.getDimension().getWidth(); y++) { Case ile = grille.getIle(x, y); if (!(ile instanceof CaseVideImpl) && ile != null) { - gridPanel.add(new Cell((Ile)ile, grille)); + gridPanel.add(new Cell((Ile) ile, grille)); } else { gridPanel.add(new Cell(x, y, grille)); } diff --git a/src/main/java/fr/hashimiste/impl/gui/builder/GrilleBuilder.java b/src/main/java/fr/hashimiste/impl/gui/builder/GrilleBuilder.java index 8fda67e..a05988a 100644 --- a/src/main/java/fr/hashimiste/impl/gui/builder/GrilleBuilder.java +++ b/src/main/java/fr/hashimiste/impl/gui/builder/GrilleBuilder.java @@ -78,15 +78,6 @@ public Dimension getDimension() { return dimension; } - @Override - public boolean estAventure() { - return aventure; - } - - public void setAventure(boolean aventure) { - this.aventure = aventure; - } - /** * Cette méthode est utilisée pour définir la dimension de la grille. * @@ -99,6 +90,15 @@ public GrilleBuilder setDimension(Dimension dimension) { return this; } + @Override + public boolean estAventure() { + return aventure; + } + + public void setAventure(boolean aventure) { + this.aventure = aventure; + } + @Override public List getSauvegardes(Stockage stockage) { throw UNSUPPORTED_OPERATION_EXCEPTION; diff --git a/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java b/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java index d7dc29c..12eaebd 100644 --- a/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java +++ b/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java @@ -1,23 +1,20 @@ package fr.hashimiste.impl.gui.component; -import fr.hashimiste.core.gui.Theme; +import fr.hashimiste.core.jeu.Case; import fr.hashimiste.core.jeu.Direction; import fr.hashimiste.core.jeu.Grille; -import fr.hashimiste.core.jeu.Ile; import fr.hashimiste.core.jeu.Historique.Action; -import fr.hashimiste.core.jeu.Case; +import fr.hashimiste.core.jeu.Ile; import fr.hashimiste.impl.gui.theme.DefaultTheme; import fr.hashimiste.impl.jeu.GrilleImpl; import java.awt.*; -import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.awt.geom.Line2D; import java.util.ArrayList; import java.util.List; -import java.util.Map; /** * Cette classe est une sous classe de previewComponent @@ -27,50 +24,14 @@ */ public abstract class GameComponent extends PreviewComponent implements MouseMotionListener, MouseListener { - /** - * Cette classe représente des ponts - * - * @author elie - */ - public class Bridge { - - Ile ile1; // première ile du pont - Ile ile2; // deuxième ile du pont - - boolean duo = false; // pont double - boolean hor; // disposition du pont true: horizontal & false: vertical - - /** - * Constructeur d'un pont potentiel - * - * @param ile1 - * @param ile2 - * @param hor - */ - public Bridge(Ile ile1, Ile ile2, boolean hor) { - this.ile1 = ile1; - this.ile2 = ile2; - this.hor = hor; - } - - public Ile getIle1() { - return ile1; - } - - public Ile getIle2() { - return ile2; - } - } - /** * Liste des ponts potentiels à afficher */ - private List potentialsBridges; - + private final List potentialsBridges; /** * Liste des ponts réels à afficher */ - private List bridges; + private final List bridges; /** * Constructeur de la classe GameComponent. @@ -101,22 +62,22 @@ protected void paintComponent(Graphics g) { Graphics2D g2 = (Graphics2D) g; float lineThickness = cell_size / 12; // Ajustez le dénominateur selon vos besoins - g2.setStroke(new BasicStroke(lineThickness*4)); - cell_size=(float)factor; + g2.setStroke(new BasicStroke(lineThickness * 4)); + cell_size = (float) factor; // Espacement entre les deux lignes d'un pont double - int bridgeSpacing = (int) (cell_size/12); + int bridgeSpacing = (int) (cell_size / 12); // Dessiner les ponts potentiels for (Bridge bridge : potentialsBridges) { g2.setColor(DefaultTheme.INSTANCE.getPotentialBridgeColor()); - if (bridge.hor) { - g2.draw(new Line2D.Float(zeroX + cell_size * bridge.ile1.getX() + cell_size + bridgeSpacing, zeroY + cell_size * bridge.ile1.getY() + cell_size / 2, - zeroX + cell_size * bridge.ile2.getX() - bridgeSpacing, zeroY + cell_size * bridge.ile1.getY() + cell_size / 2)); - } else { - g2.draw(new Line2D.Float(zeroX + cell_size * bridge.ile1.getX() + cell_size / 2, zeroY + cell_size * bridge.ile1.getY() + cell_size + bridgeSpacing, - zeroX + cell_size * bridge.ile2.getX() + cell_size / 2, zeroY + cell_size * bridge.ile2.getY() - bridgeSpacing)); - } + if (bridge.hor) { + g2.draw(new Line2D.Float(zeroX + cell_size * bridge.ile1.getX() + cell_size + bridgeSpacing, zeroY + cell_size * bridge.ile1.getY() + cell_size / 2, + zeroX + cell_size * bridge.ile2.getX() - bridgeSpacing, zeroY + cell_size * bridge.ile1.getY() + cell_size / 2)); + } else { + g2.draw(new Line2D.Float(zeroX + cell_size * bridge.ile1.getX() + cell_size / 2, zeroY + cell_size * bridge.ile1.getY() + cell_size + bridgeSpacing, + zeroX + cell_size * bridge.ile2.getX() + cell_size / 2, zeroY + cell_size * bridge.ile2.getY() - bridgeSpacing)); + } } @@ -149,9 +110,9 @@ protected void paintComponent(Graphics g) { } } - /** * Evenement de mouvement de la souris + * * @param e the event to be processed */ @Override @@ -162,6 +123,7 @@ public void mouseMoved(MouseEvent e) { /** * rafraichit la liste des ponts potentiels en fonction de la position de la souris + * * @param souris_x * @param souris_y */ @@ -192,7 +154,7 @@ public void refreshBridge(int souris_x, int souris_y) { if (ileNord != null && ileSud != null) { potentialsBridges.add(new Bridge(ileNord, ileSud, false)); } - if(potentialsBridges.size() >= 2) { + if (potentialsBridges.size() >= 2) { int t = getNearestBridge(souris_x, souris_y); Bridge b = potentialsBridges.get(t); potentialsBridges.clear(); @@ -222,7 +184,6 @@ public void refreshBridge(int souris_x, int souris_y) { repaint(); } - /** * Retourne vrai si au moins un potentiel pont est survolé * @@ -241,7 +202,7 @@ public boolean isBridgeHover() { */ public Ile getIsle(int x, int y) { for (Case ile : getGrille().getIles()) { - if (ile instanceof Ile && ile.getX() == x && ile.getY() == y) return (Ile)ile; + if (ile instanceof Ile && ile.getX() == x && ile.getY() == y) return (Ile) ile; } return null; } @@ -296,27 +257,25 @@ public void mouseClicked(MouseEvent e) { /** * Retourne l'index du pont potentiel le plus proche + * * @param souris_x * @param souris_y * @return index */ - public int getNearestBridge(int souris_x, int souris_y) - { + public int getNearestBridge(int souris_x, int souris_y) { double factor = Math.min((getSize().getWidth() - 5) / getGrille().getDimension().width, (getSize().getHeight() - 5) / getGrille().getDimension().height); int zeroX = (int) ((getSize().width / 2d) - ((getGrille().getDimension().width * factor) / 2)); int zeroY = (int) ((getSize().height / 2d) - ((getGrille().getDimension().height * factor) / 2)); int i = (this.getWidth() - zeroX - zeroX) / getGrille().getDimension().width; int x = (souris_x - zeroX) / i; int y = (souris_y - zeroY) / i; - if(potentialsBridges.size() > 1 && getIsle(x,y) == null) - { - double sy = souris_y-(zeroY + y*factor); - double quarter = factor/4; + if (potentialsBridges.size() > 1 && getIsle(x, y) == null) { + double sy = souris_y - (zeroY + y * factor); + double quarter = factor / 4; //System.out.println("x: " + x + " y:" + y + " sx:" + souris_x + " sy" + (sy)); - if(sy < quarter || sy > quarter*3) - { + if (sy < quarter || sy > quarter * 3) { return 1; - }else{ + } else { return 0; } //System.out.println(factor); @@ -326,6 +285,7 @@ public int getNearestBridge(int souris_x, int souris_y) /** * Evenement de clique de la souris + * * @param e the event to be processed */ @Override @@ -339,15 +299,13 @@ public void mousePressed(MouseEvent e) { if (index < 0) { // Ajouter le pont à la liste des ponts boolean pose = true; - for(Bridge b : bridges) - { - if(isCrossing(selectedBridge, b)) - { + for (Bridge b : bridges) { + if (isCrossing(selectedBridge, b)) { pose = false; break; } } - if(pose){ + if (pose) { bridges.add(selectedBridge); ((GrilleImpl) getGrille()).poserPont(selectedBridge.ile1, selectedBridge.ile2, 1); onNewBridge(selectedBridge.ile1, selectedBridge.ile2, Action.UN_PONT); @@ -379,9 +337,9 @@ public void mousePressed(MouseEvent e) { public abstract void onNewBridge(Ile ile1, Ile ile2, Action action); - /** * methode qui retourne si le pont passer en paramètre existe déjà et retourne sont index ou -1 sinon + * * @param bridge * @return index */ @@ -397,8 +355,8 @@ private int BridgeAlreadyExists(Bridge bridge) { } /** - * * Fonction retournant si 2 ponts se croisent + * * @param bridge1 * @param bridge2 * @return boolean @@ -423,9 +381,6 @@ private boolean isCrossing(Bridge bridge1, Bridge bridge2) { return false; } - - - @Override public void mouseReleased(MouseEvent e) { @@ -440,4 +395,39 @@ public void mouseEntered(MouseEvent e) { public void mouseExited(MouseEvent e) { } + + /** + * Cette classe représente des ponts + * + * @author elie + */ + public class Bridge { + + Ile ile1; // première ile du pont + Ile ile2; // deuxième ile du pont + + boolean duo = false; // pont double + boolean hor; // disposition du pont true: horizontal & false: vertical + + /** + * Constructeur d'un pont potentiel + * + * @param ile1 + * @param ile2 + * @param hor + */ + public Bridge(Ile ile1, Ile ile2, boolean hor) { + this.ile1 = ile1; + this.ile2 = ile2; + this.hor = hor; + } + + public Ile getIle1() { + return ile1; + } + + public Ile getIle2() { + return ile2; + } + } } diff --git a/src/main/java/fr/hashimiste/impl/gui/component/PreviewComponent.java b/src/main/java/fr/hashimiste/impl/gui/component/PreviewComponent.java index 95151af..58745a0 100644 --- a/src/main/java/fr/hashimiste/impl/gui/component/PreviewComponent.java +++ b/src/main/java/fr/hashimiste/impl/gui/component/PreviewComponent.java @@ -43,7 +43,7 @@ protected void paintComponent(Graphics g) { g.drawRect(zeroX, zeroY, (int) (grille.getDimension().width * factor), (int) (grille.getDimension().height * factor)); for (Case c : grille.getIles()) { if (c instanceof Ile) { - Ile ile = (Ile)c; + Ile ile = (Ile) c; g.setColor(Color.BLACK); g.drawOval((int) (zeroX + ile.getX() * factor), (int) (zeroY + ile.getY() * factor), (int) (factor), (int) (factor)); g.setFont(font); diff --git a/src/main/java/fr/hashimiste/impl/gui/dev/DebugFrame.java b/src/main/java/fr/hashimiste/impl/gui/dev/DebugFrame.java index 3cd5716..98e9e35 100644 --- a/src/main/java/fr/hashimiste/impl/gui/dev/DebugFrame.java +++ b/src/main/java/fr/hashimiste/impl/gui/dev/DebugFrame.java @@ -89,7 +89,7 @@ public DebugFrame(Stockage stockage) { panels.addTab("Editor", new JPanel()); panels.addChangeListener(new ChangeListener() { - private JFrame builder = new Editor(new File("hashimiste.properties"), stockage, null); + private final JFrame builder = new Editor(new File("hashimiste.properties"), stockage, null); @Override public void stateChanged(ChangeEvent e) { @@ -289,7 +289,7 @@ private void frameChanged() { * Cette méthode est utilisée pour afficher ou cacher les boîtes de composants. * * @param component le composant à afficher ou cacher. - * @param afficher vrai pour afficher les boîtes, faux pour les cacher. + * @param afficher vrai pour afficher les boîtes, faux pour les cacher. */ private void afficherBoites(JComponent component, boolean afficher) { if (afficher) { diff --git a/src/main/java/fr/hashimiste/impl/gui/jeu/Jeu.java b/src/main/java/fr/hashimiste/impl/gui/jeu/Jeu.java index 327733e..24a983c 100644 --- a/src/main/java/fr/hashimiste/impl/gui/jeu/Jeu.java +++ b/src/main/java/fr/hashimiste/impl/gui/jeu/Jeu.java @@ -4,16 +4,15 @@ import fr.hashimiste.core.gui.JFrameTemplateProfil; import fr.hashimiste.core.jeu.Grille; import fr.hashimiste.core.jeu.Historique; +import fr.hashimiste.core.jeu.Historique.Action; import fr.hashimiste.core.jeu.Ile; import fr.hashimiste.core.jeu.Sauvegarde; -import fr.hashimiste.core.jeu.Historique.Action; -import fr.hashimiste.core.utils.CollectionsUtils; import fr.hashimiste.impl.gui.component.GameComponent; -import fr.hashimiste.impl.gui.component.PreviewComponent; import javax.swing.*; import java.awt.*; -import java.awt.event.*; +import java.awt.event.MouseEvent; +import java.awt.event.MouseMotionListener; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -29,15 +28,10 @@ public class Jeu extends JFrameTemplateProfil implements Debuggable, MouseMotion private final JButton butMenu = creerBoutton("Menu", fenetreParente); private final JButton butVerifier = creerBoutton("Vérifier", this::verifier); private final JButton butAide = creerBoutton("Aide", this::aide); - private final JButton butCharger = creerBoutton("Charger", this::charger); - private final JButton butSauvegarder = creerBoutton("Sauvegarder", this::sauvegarder); - private final JButton butCheckpoint = creerBoutton("Checkpoint", this::checkpoint); - private final List historiques = new ArrayList<>(); - private transient Historique precedent; - private transient List sauvegardes; - private transient GameComponent gameComponent; - - + private final List historiques = new ArrayList<>(); private final JButton butCharger = creerBoutton("Charger", this::charger); + private transient Historique precedent; private final JButton butSauvegarder = creerBoutton("Sauvegarder", this::sauvegarder); + private transient List sauvegardes; private final JButton butCheckpoint = creerBoutton("Checkpoint", this::checkpoint); + private final transient GameComponent gameComponent; /** * Constructeur de la classe Jeu. * @@ -75,12 +69,11 @@ public void onNewBridge(Ile ile1, Ile ile2, Action action) { precedent = precedent.creerSuivant(ile1, ile2, action); } }; - + game.add(gameComponent, BorderLayout.CENTER); chargerHistorique(new Historique(grille, null, null, Historique.Action.NOUVELLE_GRILLE)); - // Add the game panel to the frame constraints.gridy = 1; // Set the gridy to 1 to place it below the buttons constraints.weighty = 1; // Set weighty to 1 to make it fill the remaining space @@ -89,6 +82,7 @@ public void onNewBridge(Ile ile1, Ile ile2, Action action) { game.addMouseMotionListener(gameComponent); game.addMouseListener(gameComponent); } + /** * Cette méthode est utilisée pour vérifier le jeu. */ @@ -150,8 +144,6 @@ private void sauvegarder() { } } - private final JButton butPrecedent = creerBoutton("Retour", this::precedent); - /** * Cette méthode est utilisée pour créer un point de contrôle dans le jeu. */ @@ -200,8 +192,7 @@ public String getDebugInfo() { sb.append(h).append("\n"); } return sb.toString(); - } - + } private final JButton butPrecedent = creerBoutton("Retour", this::precedent); @Override public void mouseDragged(MouseEvent e) { @@ -212,4 +203,13 @@ public void mouseDragged(MouseEvent e) { public void mouseMoved(MouseEvent e) { System.out.println("Mouse moved"); } + + + + + + + + + } diff --git a/src/main/java/fr/hashimiste/impl/gui/menu/Aventure.java b/src/main/java/fr/hashimiste/impl/gui/menu/Aventure.java index 269abc0..db73355 100644 --- a/src/main/java/fr/hashimiste/impl/gui/menu/Aventure.java +++ b/src/main/java/fr/hashimiste/impl/gui/menu/Aventure.java @@ -26,16 +26,16 @@ public class Aventure extends JFrameTemplateProfil { // Niveau as affiché avec la classe fr.hashimiste.impl.gui.jeu.Jeu [new Jeu(this, laGrille)] private final JFrame[] niveaux = new JFrame[]{ - new Jeu(this,grilles.get(1)), - new Jeu(this,grilles.get(2)), - new Jeu(this,grilles.get(3)), - new Jeu(this,grilles.get(0)), - new Jeu(this,grilles.get(4)), - new Jeu(this,grilles.get(5)), - new Jeu(this,grilles.get(6)), - new Jeu(this,grilles.get(7)), - new Jeu(this,grilles.get(8)), - new Jeu(this,grilles.get(9)) + new Jeu(this, grilles.get(1)), + new Jeu(this, grilles.get(2)), + new Jeu(this, grilles.get(3)), + new Jeu(this, grilles.get(0)), + new Jeu(this, grilles.get(4)), + new Jeu(this, grilles.get(5)), + new Jeu(this, grilles.get(6)), + new Jeu(this, grilles.get(7)), + new Jeu(this, grilles.get(8)), + new Jeu(this, grilles.get(9)) }; /** diff --git a/src/main/java/fr/hashimiste/impl/gui/theme/CandyTheme.java b/src/main/java/fr/hashimiste/impl/gui/theme/CandyTheme.java index a458214..5907248 100644 --- a/src/main/java/fr/hashimiste/impl/gui/theme/CandyTheme.java +++ b/src/main/java/fr/hashimiste/impl/gui/theme/CandyTheme.java @@ -23,33 +23,30 @@ public class CandyTheme implements Theme { * La couleur du texte des boutons dans le thème par défaut. */ private static final Color TEXTE_BOUTON; - - static { - String osName = System.getProperty("os.name").toLowerCase(); - if (osName.contains("mac")) { - // Mac - TEXTE_BOUTON = Color.BLACK; - } else { - // Autres systèmes (Linux, etc.) - TEXTE_BOUTON = new Color(251, 250, 242); // Couleur par défaut - } - } - /** * La couleur des boutons désactivés dans le thème par défaut. */ private static final Color BOUTON_DESACTIVE = new Color(255, 92, 138); - /** * La couleur de fond dans le thème par défaut. */ private static final Color FOND = new Color(255, 153, 172); - /** * La couleur transparente dans le thème par défaut. */ private static final Color TRANSPARENT = new Color(0, 0, 0, 0); + static { + String osName = System.getProperty("os.name").toLowerCase(); + if (osName.contains("mac")) { + // Mac + TEXTE_BOUTON = Color.BLACK; + } else { + // Autres systèmes (Linux, etc.) + TEXTE_BOUTON = new Color(251, 250, 242); // Couleur par défaut + } + } + /** * Le constructeur privé de la classe DefaultTheme. * Il est privé pour empêcher l'instanciation directe de cette classe. diff --git a/src/main/java/fr/hashimiste/impl/gui/theme/DarkTheme.java b/src/main/java/fr/hashimiste/impl/gui/theme/DarkTheme.java index 2931fb5..bb7e8bd 100644 --- a/src/main/java/fr/hashimiste/impl/gui/theme/DarkTheme.java +++ b/src/main/java/fr/hashimiste/impl/gui/theme/DarkTheme.java @@ -23,33 +23,30 @@ public class DarkTheme implements Theme { * La couleur du texte des boutons dans le thème par défaut. */ private static final Color TEXTE_BOUTON; - - static { - String osName = System.getProperty("os.name").toLowerCase(); - if (osName.contains("mac")) { - // Mac - TEXTE_BOUTON = Color.BLACK; - } else { - // Autres systèmes (Linux, etc.) - TEXTE_BOUTON = new Color(251, 250, 242); // Couleur par défaut - } - } - /** * La couleur des boutons désactivés dans le thème par défaut. */ private static final Color BOUTON_DESACTIVE = new Color(79, 1, 71); - /** * La couleur de fond dans le thème par défaut. */ private static final Color FOND = new Color(110, 30, 82); - /** * La couleur transparente dans le thème par défaut. */ private static final Color TRANSPARENT = new Color(0, 0, 0, 0); + static { + String osName = System.getProperty("os.name").toLowerCase(); + if (osName.contains("mac")) { + // Mac + TEXTE_BOUTON = Color.BLACK; + } else { + // Autres systèmes (Linux, etc.) + TEXTE_BOUTON = new Color(251, 250, 242); // Couleur par défaut + } + } + /** * Le constructeur privé de la classe DefaultTheme. * Il est privé pour empêcher l'instanciation directe de cette classe. diff --git a/src/main/java/fr/hashimiste/impl/gui/theme/DebugTheme.java b/src/main/java/fr/hashimiste/impl/gui/theme/DebugTheme.java index 1426032..98c4035 100644 --- a/src/main/java/fr/hashimiste/impl/gui/theme/DebugTheme.java +++ b/src/main/java/fr/hashimiste/impl/gui/theme/DebugTheme.java @@ -24,6 +24,14 @@ public class DebugTheme implements Theme { * La couleur du texte des boutons dans le thème de débogage. */ private static final Color TEXTE_BOUTON; + /** + * La couleur des boutons désactivés dans le thème de débogage. + */ + private static final Color BOUTON_DESACTIVE = new Color(0, 0, 255); + /** + * La couleur transparente dans le thème de débogage. + */ + private static final Color TRANSPARENT = new Color(0, 0, 0, 0); static { String osName = System.getProperty("os.name").toLowerCase(); @@ -36,16 +44,6 @@ public class DebugTheme implements Theme { } } - /** - * La couleur des boutons désactivés dans le thème de débogage. - */ - private static final Color BOUTON_DESACTIVE = new Color(0, 0, 255); - - /** - * La couleur transparente dans le thème de débogage. - */ - private static final Color TRANSPARENT = new Color(0, 0, 0, 0); - /** * Le constructeur privé de la classe DebugTheme. * Il est privé pour empêcher l'instanciation directe de cette classe. @@ -84,5 +82,7 @@ public Color getTextColor() { } @Override - public Color getPotentialBridgeColor() { return Color.BLUE; } + public Color getPotentialBridgeColor() { + return Color.BLUE; + } } diff --git a/src/main/java/fr/hashimiste/impl/gui/theme/DefaultTheme.java b/src/main/java/fr/hashimiste/impl/gui/theme/DefaultTheme.java index cc4f2ff..f551c0e 100644 --- a/src/main/java/fr/hashimiste/impl/gui/theme/DefaultTheme.java +++ b/src/main/java/fr/hashimiste/impl/gui/theme/DefaultTheme.java @@ -24,33 +24,30 @@ public class DefaultTheme implements Theme { * Si windows, alors 251, 250, 242, sur mac, 0, 0, 0 */ private static final Color TEXTE_BOUTON; - - static { - String osName = System.getProperty("os.name").toLowerCase(); - if (osName.contains("mac")) { - // Mac - TEXTE_BOUTON = Color.BLACK; - } else { - // Autres systèmes (Linux, etc.) - TEXTE_BOUTON = new Color(251, 250, 242); // Couleur par défaut - } - } - /** * La couleur des boutons désactivés dans le thème par défaut. */ private static final Color BOUTON_DESACTIVE = new Color(197, 179, 179); - /** * La couleur de fond dans le thème par défaut. */ private static final Color FOND = new Color(251, 250, 242); - /** * La couleur transparente dans le thème par défaut. */ private static final Color TRANSPARENT = new Color(0, 0, 0, 0); + static { + String osName = System.getProperty("os.name").toLowerCase(); + if (osName.contains("mac")) { + // Mac + TEXTE_BOUTON = Color.BLACK; + } else { + // Autres systèmes (Linux, etc.) + TEXTE_BOUTON = new Color(251, 250, 242); // Couleur par défaut + } + } + /** * Le constructeur privé de la classe DefaultTheme. * Il est privé pour empêcher l'instanciation directe de cette classe. diff --git a/src/main/java/fr/hashimiste/impl/jeu/CaseVideImpl.java b/src/main/java/fr/hashimiste/impl/jeu/CaseVideImpl.java index b959c2b..3ff2a0d 100644 --- a/src/main/java/fr/hashimiste/impl/jeu/CaseVideImpl.java +++ b/src/main/java/fr/hashimiste/impl/jeu/CaseVideImpl.java @@ -30,46 +30,46 @@ public Grille getGrille() { } @Override - public Case getVoisinCase(Direction d){ + public Case getVoisinCase(Direction d) { Case c = null; - switch (d){ + switch (d) { case NORD: - c = (grille.getIle(x-1,y)); + c = (grille.getIle(x - 1, y)); break; case EST: - c = (grille.getIle(x,y+1)); + c = (grille.getIle(x, y + 1)); break; case SUD: - c = (grille.getIle(x+1,y)); + c = (grille.getIle(x + 1, y)); break; case OUEST: - c = (grille.getIle(x,y-1)); + c = (grille.getIle(x, y - 1)); } return c; } @Override - public Ile getVoisinIle(Direction d){ + public Ile getVoisinIle(Direction d) { return getVoisinCase(d).getVoisinIle(d); } @Override public int opParcours(Direction d) { - switch (d){ + switch (d) { case NORD: - if(x < 1) + if (x < 1) return -1; break; case EST: - if(y > grille.getDimension().getWidth()-2) + if (y > grille.getDimension().getWidth() - 2) return -1; break; case SUD: - if(x > grille.getDimension().getHeight()-2) + if (x > grille.getDimension().getHeight() - 2) return -1; break; case OUEST: - if(y < 1) + if (y < 1) return -1; break; } diff --git a/src/main/java/fr/hashimiste/impl/jeu/GrilleImpl.java b/src/main/java/fr/hashimiste/impl/jeu/GrilleImpl.java index 0ef64a3..3df214b 100644 --- a/src/main/java/fr/hashimiste/impl/jeu/GrilleImpl.java +++ b/src/main/java/fr/hashimiste/impl/jeu/GrilleImpl.java @@ -63,9 +63,9 @@ public GrilleImpl(int id, Dimension dimension, Difficulte difficulte, boolean es this.id = id; this.dimension = dimension; this.iles = new Case[dimension.width][dimension.height]; - for(int i=0; i 2) mess = "La "+uIT.getTechU().getNom()+" peut être utilisée en x = "+uIT.getIleU().getX()+" et en y = "+uIT.getIleU().getY(); + if (nbClicSurAide == 0) mess = "La " + uIT.getTechU().getNom() + " peut être utilisée !"; + if (nbClicSurAide == 1) + mess = "La " + uIT.getTechU().getNom() + " peut être utilisée : " + uIT.getTechU().getDescription(); + if (nbClicSurAide == 2) + mess = "La " + uIT.getTechU().getNom() + " peut être utilisée dans la région " + uIT.getIleU().getRegion(); + if (nbClicSurAide > 2) + mess = "La " + uIT.getTechU().getNom() + " peut être utilisée en x = " + uIT.getIleU().getX() + " et en y = " + uIT.getIleU().getY(); System.out.println(mess); - nbClicSurAide ++; + nbClicSurAide++; return new UnionIleString(uIT.getIleU(), mess); } @@ -215,10 +218,10 @@ public UnionIleTechnique chercherIle() { Ile tempIle; for (int i = 0; i < this.dimension.getWidth(); i++) { //parcours colonnes for (int j = 0; j < this.dimension.getHeight(); j++) { //parcours - tempCase = this.getIle(i,j); - if (tempCase instanceof IleImpl){ //si l'île existe - tempIle = (IleImpl)tempCase; - if(!(tempIle.isComplete())) { //si l'île n'est pas complète + tempCase = this.getIle(i, j); + if (tempCase instanceof IleImpl) { //si l'île existe + tempIle = (IleImpl) tempCase; + if (!(tempIle.isComplete())) { //si l'île n'est pas complète for (int fInd = 0; fInd < fIndMin; fInd++) { //parcours techniques if (lTech[fInd].test(tempIle)) { //si la technique s'applique à l'île aideIle = tempIle; @@ -230,7 +233,7 @@ public UnionIleTechnique chercherIle() { } } - return new UnionIleTechnique(aideIle,lTech[fIndMin]); + return new UnionIleTechnique(aideIle, lTech[fIndMin]); } } diff --git a/src/main/java/fr/hashimiste/impl/jeu/IleImpl.java b/src/main/java/fr/hashimiste/impl/jeu/IleImpl.java index ac729c5..6043b4c 100644 --- a/src/main/java/fr/hashimiste/impl/jeu/IleImpl.java +++ b/src/main/java/fr/hashimiste/impl/jeu/IleImpl.java @@ -5,7 +5,6 @@ import fr.hashimiste.core.jeu.Direction; import fr.hashimiste.core.jeu.Grille; import fr.hashimiste.core.jeu.Ile; -import org.python.antlr.ast.Raise; import java.util.Arrays; import java.util.function.Predicate; @@ -66,33 +65,33 @@ public boolean isComplete() { } @Override - public boolean isVoisinDirection(Direction direction){ - switch (direction){ + public boolean isVoisinDirection(Direction direction) { + switch (direction) { case NORD: - if(x < 1) + if (x < 1) return false; break; case EST: - if(y > grille.getDimension().getWidth()-2) + if (y > grille.getDimension().getWidth() - 2) return false; break; case SUD: - if(x > grille.getDimension().getHeight()-2) + if (x > grille.getDimension().getHeight() - 2) return false; break; case OUEST: - if(y < 1) + if (y < 1) return false; break; } - return(getVoisinCase(direction).opParcours(direction) > 0); + return (getVoisinCase(direction).opParcours(direction) > 0); } @Override public int getNbVoisin() { int nbTotal = 0; - for(Direction value: Direction.values()){ + for (Direction value : Direction.values()) { nbTotal += isVoisinDirection(value) ? 1 : 0; } @@ -103,8 +102,8 @@ public int getNbVoisin() { public int getNbVoisinFiltre(Predicate filtre) { int nbTotal = 0; - for(Direction value: Direction.values()){ - if(isVoisinDirection(value)) { + for (Direction value : Direction.values()) { + if (isVoisinDirection(value)) { nbTotal += filtre.test(getVoisinCase(value).getVoisinIle(value)) ? 1 : 0; } } @@ -116,8 +115,8 @@ public int getNbVoisinFiltre(Predicate filtre) { public int getNbPont() { int nbTotal = 0; - for(Direction value: Direction.values()){ - nbTotal += getVoisinCase(value) instanceof PontImpl ? ((PontImpl)getVoisinCase(value)).getN() : 0; + for (Direction value : Direction.values()) { + nbTotal += getVoisinCase(value) instanceof PontImpl ? ((PontImpl) getVoisinCase(value)).getN() : 0; } return nbTotal; @@ -127,8 +126,8 @@ public int getNbPont() { public int getNbPontPossible() { int nbTotal = 0; - for(Direction value: Direction.values()){ - nbTotal += isVoisinDirection(value) ? min(getVoisinCase(value).opParcours(value),2) : 0; + for (Direction value : Direction.values()) { + nbTotal += isVoisinDirection(value) ? min(getVoisinCase(value).opParcours(value), 2) : 0; } return nbTotal; @@ -136,7 +135,7 @@ public int getNbPontPossible() { @Override public int getNbPontsDirections(Direction direction) { - return (getVoisinCase(direction) instanceof PontImpl ? ((PontImpl)getVoisinCase(direction)).getN() : 0); + return (getVoisinCase(direction) instanceof PontImpl ? ((PontImpl) getVoisinCase(direction)).getN() : 0); } @Override @@ -150,15 +149,15 @@ public String getRegion() { int w = (int) this.grille.getDimension().getWidth(); int h = (int) this.grille.getDimension().getHeight(); - if(this.x < h/3) reg = "NORD"; - else if(this.x > (h/3)*2) reg = "SUD"; + if (this.x < h / 3) reg = "NORD"; + else if (this.x > (h / 3) * 2) reg = "SUD"; else reg = "CENTRE"; - reg = reg+"-"; + reg = reg + "-"; - if(this.y < w/3) reg = reg+"OUEST"; - else if(this.y > 2*(w/3)) reg = reg+"EST"; - else reg = reg+"CENTRE"; + if (this.y < w / 3) reg = reg + "OUEST"; + else if (this.y > 2 * (w / 3)) reg = reg + "EST"; + else reg = reg + "CENTRE"; return reg; } @@ -169,38 +168,38 @@ public Grille getGrille() { } @Override - public Case getVoisinCase(Direction d){ + public Case getVoisinCase(Direction d) { Case c = null; - switch (d){ + switch (d) { case NORD: - if(x<1) return null; - c = (grille.getIle(x-1,y)); + if (x < 1) return null; + c = (grille.getIle(x - 1, y)); break; case EST: - if(y > grille.getDimension().getWidth()-2) return null; - c = (grille.getIle(x,y+1)); + if (y > grille.getDimension().getWidth() - 2) return null; + c = (grille.getIle(x, y + 1)); break; case SUD: - if(x > grille.getDimension().getHeight()-2) return null; - c = (grille.getIle(x+1,y)); + if (x > grille.getDimension().getHeight() - 2) return null; + c = (grille.getIle(x + 1, y)); break; case OUEST: - if(y < 1) return null; - c = (grille.getIle(x,y-1)); + if (y < 1) return null; + c = (grille.getIle(x, y - 1)); } return c; } @Override - public Ile getVoisinIle(Direction d){ + public Ile getVoisinIle(Direction d) { return this; } @Override - public int opParcours(Direction d){ - if(isComplete()) + public int opParcours(Direction d) { + if (isComplete()) return -1; - return n-getNbPont(); + return n - getNbPont(); } @Override diff --git a/src/main/java/fr/hashimiste/impl/jeu/PontImpl.java b/src/main/java/fr/hashimiste/impl/jeu/PontImpl.java index 0915c26..59799c9 100644 --- a/src/main/java/fr/hashimiste/impl/jeu/PontImpl.java +++ b/src/main/java/fr/hashimiste/impl/jeu/PontImpl.java @@ -10,7 +10,7 @@ public class PontImpl implements Pont { private final Grille grille; private final Direction direction; - public PontImpl(int x, int y, int n, Grille g, Direction d){ + public PontImpl(int x, int y, int n, Grille g, Direction d) { this.x = x; this.y = y; this.n = n; @@ -34,36 +34,36 @@ public Grille getGrille() { } @Override - public Case getVoisinCase(Direction d){ + public Case getVoisinCase(Direction d) { Case c = null; - switch (d){ + switch (d) { case NORD: - c = (grille.getIle(x-1,y)); + c = (grille.getIle(x - 1, y)); break; case EST: - c = (grille.getIle(x,y+1)); + c = (grille.getIle(x, y + 1)); break; case SUD: - c = (grille.getIle(x+1,y)); + c = (grille.getIle(x + 1, y)); break; case OUEST: - c = (grille.getIle(x,y-1)); + c = (grille.getIle(x, y - 1)); } return c; } @Override - public Ile getVoisinIle(Direction d){ + public Ile getVoisinIle(Direction d) { return getVoisinCase(d).getVoisinIle(d); } @Override - public int opParcours(Direction d){ - if(direction == Direction.NORD || direction == Direction.SUD) - if(d == Direction.NORD || d == Direction.SUD) + public int opParcours(Direction d) { + if (direction == Direction.NORD || direction == Direction.SUD) + if (d == Direction.NORD || d == Direction.SUD) return (getVoisinCase(d).opParcours(d)); - if(direction == Direction.EST || direction == Direction.OUEST) - if(d == Direction.EST || d == Direction.OUEST) + if (direction == Direction.EST || direction == Direction.OUEST) + if (d == Direction.EST || d == Direction.OUEST) return (getVoisinCase(d).opParcours(d)); return -1; } @@ -74,7 +74,7 @@ public int getN() { } @Override - public Direction getDirection(){ + public Direction getDirection() { return this.direction; } } diff --git a/src/test/java/fr/hashimiste/impl/gui/menu/AventureTest.java b/src/test/java/fr/hashimiste/impl/gui/menu/AventureTest.java index ab0d0d0..48ade68 100644 --- a/src/test/java/fr/hashimiste/impl/gui/menu/AventureTest.java +++ b/src/test/java/fr/hashimiste/impl/gui/menu/AventureTest.java @@ -5,13 +5,15 @@ import java.awt.*; import java.io.IOException; -import java.util.*; +import java.util.HashMap; +import java.util.Map; -class AventureTest extends TestMenu{ +class AventureTest extends TestMenu { private Aventure aventure; /** * Renvoie le conteneur à tester + * * @return le conteneur à tester */ @Override @@ -21,6 +23,7 @@ protected Container getTestContainer() { /** * Teste l'initialisation du menu + * * @throws IOException si une erreur d'entrée/sortie survient */ @BeforeEach @@ -34,7 +37,7 @@ void testMenuInitialisation() throws IOException { * Teste le menu Paramètre */ @Test - void testMenuParametre(){ + void testMenuParametre() { testerMenu(aventure, "Hashimiste", new Dimension(800, 600)); testThemeMenu(aventure, "default"); diff --git a/src/test/java/fr/hashimiste/impl/gui/menu/MenuTest.java b/src/test/java/fr/hashimiste/impl/gui/menu/MenuTest.java index 9fe16c0..a391bdc 100644 --- a/src/test/java/fr/hashimiste/impl/gui/menu/MenuTest.java +++ b/src/test/java/fr/hashimiste/impl/gui/menu/MenuTest.java @@ -1,23 +1,23 @@ package fr.hashimiste.impl.gui.menu; -import static org.junit.jupiter.api.Assertions.*; - import fr.hashimiste.core.data.Filter; import fr.hashimiste.core.data.Join; import fr.hashimiste.core.data.Stockage; +import fr.hashimiste.core.gui.JFrameTemplate; +import fr.hashimiste.core.joueur.Profil; import fr.hashimiste.impl.joueur.ProfilImpl; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; + import javax.swing.*; import java.awt.*; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; -import java.util.*; import java.util.List; +import java.util.*; -import fr.hashimiste.core.joueur.Profil; -import fr.hashimiste.core.gui.JFrameTemplate; +import static org.junit.jupiter.api.Assertions.assertEquals; class MenuTest extends TestMenu { @@ -25,6 +25,7 @@ class MenuTest extends TestMenu { /** * Renvoie le conteneur à tester + * * @return le conteneur à tester */ @Override @@ -34,6 +35,7 @@ protected Container getTestContainer() { /** * Teste l'initialisation du menu + * * @throws IOException si une erreur d'entrée/sortie survient */ @BeforeEach diff --git a/src/test/java/fr/hashimiste/impl/gui/menu/ModeLibreTest.java b/src/test/java/fr/hashimiste/impl/gui/menu/ModeLibreTest.java index ab211ca..48de7aa 100644 --- a/src/test/java/fr/hashimiste/impl/gui/menu/ModeLibreTest.java +++ b/src/test/java/fr/hashimiste/impl/gui/menu/ModeLibreTest.java @@ -5,14 +5,16 @@ import java.awt.*; import java.io.IOException; -import java.util.*; +import java.util.HashMap; +import java.util.Map; -class ModeLibreTest extends TestMenu{ +class ModeLibreTest extends TestMenu { private ModeLibre modeLibre; /** * Renvoie le conteneur à tester + * * @return le conteneur à tester */ @Override @@ -22,6 +24,7 @@ protected Container getTestContainer() { /** * Teste l'initialisation du menu + * * @throws IOException si une erreur d'entrée/sortie survient */ @BeforeEach @@ -35,7 +38,7 @@ void testMenuInitialisation() throws IOException { * Teste le menu mode libre */ @Test - void testMenuModeLibre(){ + void testMenuModeLibre() { testerMenu(modeLibre, "Hashimiste", new Dimension(800, 600)); testThemeMenu(modeLibre, "default"); diff --git a/src/test/java/fr/hashimiste/impl/gui/menu/ParametreTest.java b/src/test/java/fr/hashimiste/impl/gui/menu/ParametreTest.java index b8f2b7d..8fc473d 100644 --- a/src/test/java/fr/hashimiste/impl/gui/menu/ParametreTest.java +++ b/src/test/java/fr/hashimiste/impl/gui/menu/ParametreTest.java @@ -5,14 +5,16 @@ import java.awt.*; import java.io.IOException; -import java.util.*; +import java.util.HashMap; +import java.util.Map; -class ParametreTest extends TestMenu{ +class ParametreTest extends TestMenu { private Parametre parametre; /** * Renvoie le conteneur à tester + * * @return le conteneur à tester */ @Override @@ -22,6 +24,7 @@ protected Container getTestContainer() { /** * Teste l'initialisation du menu + * * @throws IOException si une erreur d'entrée/sortie survient */ @BeforeEach @@ -35,7 +38,7 @@ void testMenuInitialisation() throws IOException { * Teste le menu Paramètre */ @Test - void testMenuParametre(){ + void testMenuParametre() { testerMenu(parametre, "Hashimiste", new Dimension(800, 600)); testThemeMenu(parametre, "default"); diff --git a/src/test/java/fr/hashimiste/impl/gui/menu/ProfilSelectionTest.java b/src/test/java/fr/hashimiste/impl/gui/menu/ProfilSelectionTest.java index cd21463..be29a46 100644 --- a/src/test/java/fr/hashimiste/impl/gui/menu/ProfilSelectionTest.java +++ b/src/test/java/fr/hashimiste/impl/gui/menu/ProfilSelectionTest.java @@ -1,4 +1,5 @@ package fr.hashimiste.impl.gui.menu; + import fr.hashimiste.core.data.Filter; import fr.hashimiste.core.data.Join; import fr.hashimiste.core.data.Stockage; @@ -15,7 +16,7 @@ import java.util.List; import java.util.Properties; -class ProfilSelectionTest extends TestMenu{ +class ProfilSelectionTest extends TestMenu { private ProfilSelection profilSelection; @Override @@ -25,6 +26,7 @@ protected Container getTestContainer() { /** * Teste l'initialisation du menu + * * @throws IOException si une erreur d'entrée/sortie survient */ @BeforeEach @@ -67,7 +69,7 @@ public void supprimer(Class clazz, Filter filtre) { * Teste le menu de selection de profil */ @Test - void testMenuProfilSelection(){ + void testMenuProfilSelection() { testerMenu(profilSelection, "Hashimiste", new Dimension(500, 300)); testThemeMenu(profilSelection, "default"); diff --git a/src/test/java/fr/hashimiste/impl/gui/menu/TechniqueTest.java b/src/test/java/fr/hashimiste/impl/gui/menu/TechniqueTest.java index a3a2679..abcd5ba 100644 --- a/src/test/java/fr/hashimiste/impl/gui/menu/TechniqueTest.java +++ b/src/test/java/fr/hashimiste/impl/gui/menu/TechniqueTest.java @@ -5,13 +5,15 @@ import java.awt.*; import java.io.IOException; -import java.util.*; +import java.util.HashMap; +import java.util.Map; -class TechniqueTest extends TestMenu{ +class TechniqueTest extends TestMenu { private Technique technique; /** * Renvoie le conteneur à tester + * * @return le conteneur à tester */ @Override @@ -21,6 +23,7 @@ protected Container getTestContainer() { /** * Teste l'initialisation du menu + * * @throws IOException si une erreur d'entrée/sortie survient */ @BeforeEach @@ -34,7 +37,7 @@ void testMenuInitialisation() throws IOException { * Teste le menu technique */ @Test - void testMenuParametre(){ + void testMenuParametre() { testerMenu(technique, "Hashimiste", new Dimension(800, 600)); testThemeMenu(technique, "default"); diff --git a/src/test/java/fr/hashimiste/impl/gui/menu/TestMenu.java b/src/test/java/fr/hashimiste/impl/gui/menu/TestMenu.java index 5afb699..ddb18df 100644 --- a/src/test/java/fr/hashimiste/impl/gui/menu/TestMenu.java +++ b/src/test/java/fr/hashimiste/impl/gui/menu/TestMenu.java @@ -3,6 +3,7 @@ import fr.hashimiste.core.data.Filter; import fr.hashimiste.core.data.Join; import fr.hashimiste.core.data.Stockage; +import fr.hashimiste.core.gui.JFrameTemplate; import fr.hashimiste.core.gui.JFrameTemplateProfil; import fr.hashimiste.core.joueur.Profil; import fr.hashimiste.impl.gui.theme.DefaultTheme; @@ -10,24 +11,15 @@ import org.opentest4j.AssertionFailedError; import javax.swing.*; - import java.awt.*; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; -import java.util.Arrays; -import java.util.Collections; import java.util.List; -import java.util.Optional; -import java.util.Properties; +import java.util.*; import java.util.function.Predicate; -import static org.junit.jupiter.api.Assertions.assertTrue; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; - -import fr.hashimiste.core.gui.JFrameTemplate; +import static org.junit.jupiter.api.Assertions.*; public abstract class TestMenu { @@ -36,8 +28,8 @@ public abstract class TestMenu { /** * Teste le menu * - * @param menu le menu à tester - * @param titreAttendu le titre attendu + * @param menu le menu à tester + * @param titreAttendu le titre attendu * @param dimensionAttendue la dimension attendue */ protected void testerMenu(JFrame menu, String titreAttendu, Dimension dimensionAttendue) { @@ -59,8 +51,8 @@ protected void testerMenu(JFrame menu, String titreAttendu, Dimension dimensionA /** * Teste le thème du menu * - * @param menu le menu à tester - * @param themeAttendu le thème attendu + * @param menu le menu à tester + * @param themeAttendu le thème attendu */ protected void testThemeMenu(JFrameTemplate menu, String themeAttendu) { @@ -93,7 +85,7 @@ protected void verifierEtatBouton(String nomBouton, boolean attenduActif) { /** * Initialise le menu et vérifie que le profil passé en paramètre est bien le profil du menu * - * @param menu le menu à initialiser + * @param menu le menu à initialiser * @param nomMenu le nom du menu * @return le menu initialisé */ @@ -128,30 +120,30 @@ public void supprimer(Class clazz, Filter filtre) { }; JFrameTemplate frame = new ProfilSelection(tempFile.toFile(), stockage); frame = new Menu(frame, test); - switch (nomMenu) { - case "Aventure": - menu = new Aventure((JFrameTemplateProfil) frame); - break; - case "ModeLibre": - menu = new ModeLibre((JFrameTemplateProfil) frame); - break; - case "Parametre": - menu = new Parametre((JFrameTemplateProfil) frame); - break; - case "Technique": - menu = new Technique((JFrameTemplateProfil) frame); - break; - default: - break; + switch (nomMenu) { + case "Aventure": + menu = new Aventure((JFrameTemplateProfil) frame); + break; + case "ModeLibre": + menu = new ModeLibre((JFrameTemplateProfil) frame); + break; + case "Parametre": + menu = new Parametre((JFrameTemplateProfil) frame); + break; + case "Technique": + menu = new Technique((JFrameTemplateProfil) frame); + break; + default: + break; - } + } - assertEquals(test, menu.getProfil(), "Le profil devrait être le profil passé en paramètre"); + assertEquals(test, menu.getProfil(), "Le profil devrait être le profil passé en paramètre"); - System.out.println("L'initialisation du menu réussi"); + System.out.println("L'initialisation du menu réussi"); - return menu; + return menu; } /** diff --git a/src/test/java/fr/hashimiste/impl/jeu/AideTest.java b/src/test/java/fr/hashimiste/impl/jeu/AideTest.java index 987c5b2..0800243 100644 --- a/src/test/java/fr/hashimiste/impl/jeu/AideTest.java +++ b/src/test/java/fr/hashimiste/impl/jeu/AideTest.java @@ -2,8 +2,6 @@ import fr.hashimiste.core.jeu.Difficulte; import fr.hashimiste.core.jeu.Ile; -import fr.hashimiste.impl.jeu.GrilleImpl; -import fr.hashimiste.impl.jeu.IleImpl; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; @@ -26,8 +24,8 @@ public class AideTest { * Création de la grille utilisée avant le lancement des tests */ @BeforeAll - public static void initAll(){ - g = new GrilleImpl(new Dimension(6,6), Difficulte.MOYEN,false); + public static void initAll() { + g = new GrilleImpl(new Dimension(6, 6), Difficulte.MOYEN, false); listeIle = new ArrayList<>(); } @@ -35,18 +33,19 @@ public static void initAll(){ * Vidage des îles de la grille après chaque test. */ @AfterEach - public void vide(){ + public void vide() { g.viderGrille(); - while(!listeIle.isEmpty()) listeIle.remove(0); + while (!listeIle.isEmpty()) listeIle.remove(0); } /** * Après chaque test, affichage du nom du test réussi. + * * @param testInfo Infos sur le test réussi. */ @AfterEach - public void afficheOK(TestInfo testInfo){ - System.out.println("OK : "+testInfo.getDisplayName()); + public void afficheOK(TestInfo testInfo) { + System.out.println("OK : " + testInfo.getDisplayName()); } /** @@ -78,22 +77,22 @@ public void testAideBordure1() { * Test de la technique "Technique Parité" */ @Test - public void testAideParite1(){ - - listeIle.add(new IleImpl(0,0,1,g)); - listeIle.add(new IleImpl(0,2,4,g)); - listeIle.add(new IleImpl(0,4,1,g)); - listeIle.add(new IleImpl(1,3,1,g)); - listeIle.add(new IleImpl(1,4,8,g)); - listeIle.add(new IleImpl(1,5,1,g)); - listeIle.add(new IleImpl(2,2,4,g)); - listeIle.add(new IleImpl(2,4,1,g)); - listeIle.add(new IleImpl(3,3,1,g)); - listeIle.add(new IleImpl(4,1,1,g)); - listeIle.add(new IleImpl(4,3,6,g)); - listeIle.add(new IleImpl(4,5,1,g)); - - for(IleImpl i : listeIle) + public void testAideParite1() { + + listeIle.add(new IleImpl(0, 0, 1, g)); + listeIle.add(new IleImpl(0, 2, 4, g)); + listeIle.add(new IleImpl(0, 4, 1, g)); + listeIle.add(new IleImpl(1, 3, 1, g)); + listeIle.add(new IleImpl(1, 4, 8, g)); + listeIle.add(new IleImpl(1, 5, 1, g)); + listeIle.add(new IleImpl(2, 2, 4, g)); + listeIle.add(new IleImpl(2, 4, 1, g)); + listeIle.add(new IleImpl(3, 3, 1, g)); + listeIle.add(new IleImpl(4, 1, 1, g)); + listeIle.add(new IleImpl(4, 3, 6, g)); + listeIle.add(new IleImpl(4, 5, 1, g)); + + for (IleImpl i : listeIle) g.poserIle(i); Ile ileAide = g.chercherIle().getIleU(); diff --git a/src/test/java/fr/hashimiste/impl/jeu/TechniqueTest.java b/src/test/java/fr/hashimiste/impl/jeu/TechniqueTest.java index 9fea3ad..c06b1c8 100644 --- a/src/test/java/fr/hashimiste/impl/jeu/TechniqueTest.java +++ b/src/test/java/fr/hashimiste/impl/jeu/TechniqueTest.java @@ -25,8 +25,8 @@ public class TechniqueTest { * Création de la grille utilisée avant le lancement des tests */ @BeforeAll - public static void initAll(){ - g = new GrilleImpl(new Dimension(8,8),Difficulte.MOYEN,false); + public static void initAll() { + g = new GrilleImpl(new Dimension(8, 8), Difficulte.MOYEN, false); listeIle = new ArrayList<>(); } @@ -34,33 +34,34 @@ public static void initAll(){ * Vidage des îles de la grille après chaque test. */ @AfterEach - public void vide(){ + public void vide() { g.viderGrille(); - while(!listeIle.isEmpty()) listeIle.remove(0); + while (!listeIle.isEmpty()) listeIle.remove(0); } /** * Après chaque test, affichage du nom du test réussi. + * * @param testInfo Infos sur le test réussi. */ @AfterEach - public void afficheOK(TestInfo testInfo){ - System.out.println("OK : "+testInfo.getDisplayName()); + public void afficheOK(TestInfo testInfo) { + System.out.println("OK : " + testInfo.getDisplayName()); } /** * Test de la technique "Technique Bordure" avec des nombres paires */ @Test - public void testTechniqueBordure1(){ + public void testTechniqueBordure1() { - listeIle.add(new IleImpl(0,0,4,g)); - listeIle.add(new IleImpl(0,3,6,g)); - listeIle.add(new IleImpl(2,2,8,g)); - listeIle.add(new IleImpl(2,5,6,g)); - listeIle.add(new IleImpl(2,4,6,g)); + listeIle.add(new IleImpl(0, 0, 4, g)); + listeIle.add(new IleImpl(0, 3, 6, g)); + listeIle.add(new IleImpl(2, 2, 8, g)); + listeIle.add(new IleImpl(2, 5, 6, g)); + listeIle.add(new IleImpl(2, 4, 6, g)); - for(IleImpl i : listeIle) + for (IleImpl i : listeIle) g.poserIle(i); assertTrue(Technique.TECH_DEP_1.test(listeIle.get(0))); @@ -74,15 +75,15 @@ public void testTechniqueBordure1(){ * Test de la technique "Technique Bordure" avec des nombres impaires */ @Test - public void testTechniqueBordure2(){ + public void testTechniqueBordure2() { - listeIle.add(new IleImpl(0,0,3,g)); - listeIle.add(new IleImpl(0,3,5,g)); - listeIle.add(new IleImpl(2,2,7,g)); - listeIle.add(new IleImpl(2,5,4,g)); - listeIle.add(new IleImpl(2,4,3,g)); + listeIle.add(new IleImpl(0, 0, 3, g)); + listeIle.add(new IleImpl(0, 3, 5, g)); + listeIle.add(new IleImpl(2, 2, 7, g)); + listeIle.add(new IleImpl(2, 5, 4, g)); + listeIle.add(new IleImpl(2, 4, 3, g)); - for(IleImpl i : listeIle) + for (IleImpl i : listeIle) g.poserIle(i); assertFalse(Technique.TECH_DEP_1.test(listeIle.get(0))); @@ -96,23 +97,23 @@ public void testTechniqueBordure2(){ * Test de la technique "Technique Parité" */ @Test - public void testTechniqueParite1(){ - - - listeIle.add(new IleImpl(0,0,3,g)); - listeIle.add(new IleImpl(0,2,4,g)); - listeIle.add(new IleImpl(0,4,7,g)); - listeIle.add(new IleImpl(1,3,4,g)); - listeIle.add(new IleImpl(1,4,8,g)); - listeIle.add(new IleImpl(1,5,1,g)); - listeIle.add(new IleImpl(2,2,4,g)); - listeIle.add(new IleImpl(2,4,4,g)); - listeIle.add(new IleImpl(3,3,3,g)); - listeIle.add(new IleImpl(4,1,1,g)); - listeIle.add(new IleImpl(4,3,6,g)); - listeIle.add(new IleImpl(4,5,4,g)); - - for(IleImpl i : listeIle) + public void testTechniqueParite1() { + + + listeIle.add(new IleImpl(0, 0, 3, g)); + listeIle.add(new IleImpl(0, 2, 4, g)); + listeIle.add(new IleImpl(0, 4, 7, g)); + listeIle.add(new IleImpl(1, 3, 4, g)); + listeIle.add(new IleImpl(1, 4, 8, g)); + listeIle.add(new IleImpl(1, 5, 1, g)); + listeIle.add(new IleImpl(2, 2, 4, g)); + listeIle.add(new IleImpl(2, 4, 4, g)); + listeIle.add(new IleImpl(3, 3, 3, g)); + listeIle.add(new IleImpl(4, 1, 1, g)); + listeIle.add(new IleImpl(4, 3, 6, g)); + listeIle.add(new IleImpl(4, 5, 4, g)); + + for (IleImpl i : listeIle) g.poserIle(i); assertFalse(Technique.TECH_DEP_2.test(listeIle.get(1))); @@ -125,20 +126,20 @@ public void testTechniqueParite1(){ * Test de la technique "Technique Imparité" */ @Test - public void testTechniqueImparite1(){ - - listeIle.add(new IleImpl(0,0,2,g)); - listeIle.add(new IleImpl(0,2,3,g)); - listeIle.add(new IleImpl(2,0,3,g)); - listeIle.add(new IleImpl(2,2,7,g)); - listeIle.add(new IleImpl(2,4,3,g)); - listeIle.add(new IleImpl(4,0,1,g)); - listeIle.add(new IleImpl(4,2,5,g)); - listeIle.add(new IleImpl(4,4,5,g)); - listeIle.add(new IleImpl(5,2,1,g)); - listeIle.add(new IleImpl(6,4,2,g)); - - for(IleImpl i : listeIle) + public void testTechniqueImparite1() { + + listeIle.add(new IleImpl(0, 0, 2, g)); + listeIle.add(new IleImpl(0, 2, 3, g)); + listeIle.add(new IleImpl(2, 0, 3, g)); + listeIle.add(new IleImpl(2, 2, 7, g)); + listeIle.add(new IleImpl(2, 4, 3, g)); + listeIle.add(new IleImpl(4, 0, 1, g)); + listeIle.add(new IleImpl(4, 2, 5, g)); + listeIle.add(new IleImpl(4, 4, 5, g)); + listeIle.add(new IleImpl(5, 2, 1, g)); + listeIle.add(new IleImpl(6, 4, 2, g)); + + for (IleImpl i : listeIle) g.poserIle(i); assertFalse(Technique.TECH_BAS_1.test(listeIle.get(0))); @@ -154,20 +155,20 @@ public void testTechniqueImparite1(){ * Test de la technique "Technique Imparité" avec les ponts */ @Test - public void testTechniqueImparite2(){ - - listeIle.add(new IleImpl(0,0,2,g)); - listeIle.add(new IleImpl(0,2,3,g)); - listeIle.add(new IleImpl(2,0,3,g)); - listeIle.add(new IleImpl(2,2,7,g)); - listeIle.add(new IleImpl(2,4,3,g)); - listeIle.add(new IleImpl(4,0,1,g)); - listeIle.add(new IleImpl(4,2,5,g)); - listeIle.add(new IleImpl(4,4,5,g)); - listeIle.add(new IleImpl(5,2,1,g)); - listeIle.add(new IleImpl(6,4,2,g)); - - for(IleImpl i : listeIle) + public void testTechniqueImparite2() { + + listeIle.add(new IleImpl(0, 0, 2, g)); + listeIle.add(new IleImpl(0, 2, 3, g)); + listeIle.add(new IleImpl(2, 0, 3, g)); + listeIle.add(new IleImpl(2, 2, 7, g)); + listeIle.add(new IleImpl(2, 4, 3, g)); + listeIle.add(new IleImpl(4, 0, 1, g)); + listeIle.add(new IleImpl(4, 2, 5, g)); + listeIle.add(new IleImpl(4, 4, 5, g)); + listeIle.add(new IleImpl(5, 2, 1, g)); + listeIle.add(new IleImpl(6, 4, 2, g)); + + for (IleImpl i : listeIle) g.poserIle(i); g.poserPont(listeIle.get(4), listeIle.get(7), 1); @@ -180,7 +181,7 @@ public void testTechniqueImparite2(){ assertTrue(Technique.TECH_BAS_1.test(listeIle.get(4))); assertFalse(Technique.TECH_BAS_1.test(listeIle.get(6))); assertInstanceOf(PontImpl.class, listeIle.get(7).getVoisinCase(Direction.NORD)); - assertEquals(3,listeIle.get(7).getNbPont()); + assertEquals(3, listeIle.get(7).getNbPont()); assertFalse(Technique.TECH_BAS_1.test(listeIle.get(7))); } @@ -189,21 +190,21 @@ public void testTechniqueImparite2(){ * Test de la technique "Technique Imparité + Unité" */ @Test - public void testTechniqueImpariteUnite1(){ - - listeIle.add(new IleImpl(0,0,2,g)); - listeIle.add(new IleImpl(0,2,3,g)); - listeIle.add(new IleImpl(2,0,3,g)); - listeIle.add(new IleImpl(2,2,5,g)); - listeIle.add(new IleImpl(2,4,1,g)); - listeIle.add(new IleImpl(4,0,1,g)); - listeIle.add(new IleImpl(4,2,5,g)); - listeIle.add(new IleImpl(4,4,5,g)); - listeIle.add(new IleImpl(5,2,1,g)); - listeIle.add(new IleImpl(6,4,3,g)); - listeIle.add(new IleImpl(6,6,1,g)); - - for(IleImpl i : listeIle) + public void testTechniqueImpariteUnite1() { + + listeIle.add(new IleImpl(0, 0, 2, g)); + listeIle.add(new IleImpl(0, 2, 3, g)); + listeIle.add(new IleImpl(2, 0, 3, g)); + listeIle.add(new IleImpl(2, 2, 5, g)); + listeIle.add(new IleImpl(2, 4, 1, g)); + listeIle.add(new IleImpl(4, 0, 1, g)); + listeIle.add(new IleImpl(4, 2, 5, g)); + listeIle.add(new IleImpl(4, 4, 5, g)); + listeIle.add(new IleImpl(5, 2, 1, g)); + listeIle.add(new IleImpl(6, 4, 3, g)); + listeIle.add(new IleImpl(6, 6, 1, g)); + + for (IleImpl i : listeIle) g.poserIle(i); assertFalse(Technique.TECH_BAS_2.test(listeIle.get(0))); @@ -212,9 +213,9 @@ public void testTechniqueImpariteUnite1(){ assertFalse(Technique.TECH_BAS_2.test(listeIle.get(4))); assertFalse(Technique.TECH_BAS_2.test(listeIle.get(6))); IleImpl ileTest = listeIle.get(7); - assertEquals(5,ileTest.getN()); - assertEquals(3,ileTest.getNbVoisin()); - assertEquals(1,ileTest.getNbVoisinFiltre(i -> i.getN() == 1)); + assertEquals(5, ileTest.getN()); + assertEquals(3, ileTest.getNbVoisin()); + assertEquals(1, ileTest.getNbVoisinFiltre(i -> i.getN() == 1)); assertTrue(Technique.TECH_BAS_2.test(listeIle.get(7))); assertTrue(Technique.TECH_BAS_2.test(listeIle.get(9))); } @@ -223,22 +224,22 @@ public void testTechniqueImpariteUnite1(){ * Test de la technique "Technique Unité (valeur 1 et 2)" */ @Test - public void testTechniqueUniteUnDeux1(){ - - listeIle.add(new IleImpl(0,0,2,g)); - listeIle.add(new IleImpl(0,2,3,g)); - listeIle.add(new IleImpl(1,6,1,g)); - listeIle.add(new IleImpl(2,2,3,g)); - listeIle.add(new IleImpl(2,4,3,g)); - listeIle.add(new IleImpl(2,6,2,g)); - listeIle.add(new IleImpl(4,1,3,g)); - listeIle.add(new IleImpl(4,2,3,g)); - listeIle.add(new IleImpl(4,4,4,g)); - listeIle.add(new IleImpl(6,1,2,g)); - listeIle.add(new IleImpl(6,4,3,g)); - listeIle.add(new IleImpl(6,6,1,g)); - - for(IleImpl i : listeIle) + public void testTechniqueUniteUnDeux1() { + + listeIle.add(new IleImpl(0, 0, 2, g)); + listeIle.add(new IleImpl(0, 2, 3, g)); + listeIle.add(new IleImpl(1, 6, 1, g)); + listeIle.add(new IleImpl(2, 2, 3, g)); + listeIle.add(new IleImpl(2, 4, 3, g)); + listeIle.add(new IleImpl(2, 6, 2, g)); + listeIle.add(new IleImpl(4, 1, 3, g)); + listeIle.add(new IleImpl(4, 2, 3, g)); + listeIle.add(new IleImpl(4, 4, 4, g)); + listeIle.add(new IleImpl(6, 1, 2, g)); + listeIle.add(new IleImpl(6, 4, 3, g)); + listeIle.add(new IleImpl(6, 6, 1, g)); + + for (IleImpl i : listeIle) g.poserIle(i); assertTrue(Technique.TECH_BAS_3.test(listeIle.get(0))); @@ -254,22 +255,22 @@ public void testTechniqueUniteUnDeux1(){ * Test de la technique "Technique Unité (valeur 4 et 5)" */ @Test - public void testTechniqueUniteQuatreCinq1(){ - - listeIle.add(new IleImpl(0,0,1,g)); - listeIle.add(new IleImpl(0,2,4,g)); - listeIle.add(new IleImpl(0,4,1,g)); - listeIle.add(new IleImpl(1,5,3,g)); - listeIle.add(new IleImpl(1,6,2,g)); - listeIle.add(new IleImpl(2,2,5,g)); - listeIle.add(new IleImpl(2,5,4,g)); - listeIle.add(new IleImpl(2,7,1,g)); - listeIle.add(new IleImpl(4,0,1,g)); - listeIle.add(new IleImpl(4,2,5,g)); - listeIle.add(new IleImpl(4,4,1,g)); - listeIle.add(new IleImpl(6,2,1,g)); - - for(IleImpl i : listeIle) + public void testTechniqueUniteQuatreCinq1() { + + listeIle.add(new IleImpl(0, 0, 1, g)); + listeIle.add(new IleImpl(0, 2, 4, g)); + listeIle.add(new IleImpl(0, 4, 1, g)); + listeIle.add(new IleImpl(1, 5, 3, g)); + listeIle.add(new IleImpl(1, 6, 2, g)); + listeIle.add(new IleImpl(2, 2, 5, g)); + listeIle.add(new IleImpl(2, 5, 4, g)); + listeIle.add(new IleImpl(2, 7, 1, g)); + listeIle.add(new IleImpl(4, 0, 1, g)); + listeIle.add(new IleImpl(4, 2, 5, g)); + listeIle.add(new IleImpl(4, 4, 1, g)); + listeIle.add(new IleImpl(6, 2, 1, g)); + + for (IleImpl i : listeIle) g.poserIle(i); assertTrue(Technique.TECH_BAS_4.test(listeIle.get(1))); @@ -283,20 +284,20 @@ public void testTechniqueUniteQuatreCinq1(){ * Test de la technique "Technique Unité (valeur 6)" */ @Test - public void testTechniqueUniteSix1(){ - - listeIle.add(new IleImpl(0,0,1,g)); - listeIle.add(new IleImpl(0,2,1,g)); - listeIle.add(new IleImpl(2,0,3,g)); - listeIle.add(new IleImpl(2,2,6,g)); - listeIle.add(new IleImpl(2,4,4,g)); - listeIle.add(new IleImpl(4,0,2,g)); - listeIle.add(new IleImpl(4,2,6,g)); - listeIle.add(new IleImpl(4,4,4,g)); - listeIle.add(new IleImpl(6,0,1,g)); - listeIle.add(new IleImpl(6,2,2,g)); - - for(IleImpl i : listeIle) + public void testTechniqueUniteSix1() { + + listeIle.add(new IleImpl(0, 0, 1, g)); + listeIle.add(new IleImpl(0, 2, 1, g)); + listeIle.add(new IleImpl(2, 0, 3, g)); + listeIle.add(new IleImpl(2, 2, 6, g)); + listeIle.add(new IleImpl(2, 4, 4, g)); + listeIle.add(new IleImpl(4, 0, 2, g)); + listeIle.add(new IleImpl(4, 2, 6, g)); + listeIle.add(new IleImpl(4, 4, 4, g)); + listeIle.add(new IleImpl(6, 0, 1, g)); + listeIle.add(new IleImpl(6, 2, 2, g)); + + for (IleImpl i : listeIle) g.poserIle(i); assertTrue(Technique.TECH_BAS_5.test(listeIle.get(3))); @@ -309,20 +310,20 @@ public void testTechniqueUniteSix1(){ * Test de la technique "Technique Unité (valeur 6)" avec les ponts */ @Test - public void testTechniqueUniteSix2(){ - - listeIle.add(new IleImpl(0,0,1,g)); - listeIle.add(new IleImpl(0,2,1,g)); - listeIle.add(new IleImpl(2,0,3,g)); - listeIle.add(new IleImpl(2,2,6,g)); - listeIle.add(new IleImpl(2,4,4,g)); - listeIle.add(new IleImpl(4,0,2,g)); - listeIle.add(new IleImpl(4,2,6,g)); - listeIle.add(new IleImpl(4,4,4,g)); - listeIle.add(new IleImpl(6,0,1,g)); - listeIle.add(new IleImpl(6,2,2,g)); - - for(IleImpl i : listeIle) + public void testTechniqueUniteSix2() { + + listeIle.add(new IleImpl(0, 0, 1, g)); + listeIle.add(new IleImpl(0, 2, 1, g)); + listeIle.add(new IleImpl(2, 0, 3, g)); + listeIle.add(new IleImpl(2, 2, 6, g)); + listeIle.add(new IleImpl(2, 4, 4, g)); + listeIle.add(new IleImpl(4, 0, 2, g)); + listeIle.add(new IleImpl(4, 2, 6, g)); + listeIle.add(new IleImpl(4, 4, 4, g)); + listeIle.add(new IleImpl(6, 0, 1, g)); + listeIle.add(new IleImpl(6, 2, 2, g)); + + for (IleImpl i : listeIle) g.poserIle(i); g.poserPont(listeIle.get(3), listeIle.get(2), 1); @@ -339,24 +340,24 @@ public void testTechniqueUniteSix2(){ * Test des techniques "Technique Isolation (valeur 1)" et "Technique Isolation (valeur 2)" */ @Test - public void testTechniqueIsolation1(){ - - listeIle.add(new IleImpl(0,0,1,g)); - listeIle.add(new IleImpl(0,2,1,g)); - listeIle.add(new IleImpl(0,4,1,g)); - listeIle.add(new IleImpl(0,6,2,g)); - listeIle.add(new IleImpl(2,0,3,g)); - listeIle.add(new IleImpl(2,2,6,g)); - listeIle.add(new IleImpl(2,4,6,g)); - listeIle.add(new IleImpl(2,6,3,g)); - listeIle.add(new IleImpl(4,0,2,g)); - listeIle.add(new IleImpl(4,2,6,g)); - listeIle.add(new IleImpl(4,4,4,g)); - listeIle.add(new IleImpl(6,0,1,g)); - listeIle.add(new IleImpl(6,2,2,g)); - listeIle.add(new IleImpl(6,4,2,g)); - - for(IleImpl i : listeIle) + public void testTechniqueIsolation1() { + + listeIle.add(new IleImpl(0, 0, 1, g)); + listeIle.add(new IleImpl(0, 2, 1, g)); + listeIle.add(new IleImpl(0, 4, 1, g)); + listeIle.add(new IleImpl(0, 6, 2, g)); + listeIle.add(new IleImpl(2, 0, 3, g)); + listeIle.add(new IleImpl(2, 2, 6, g)); + listeIle.add(new IleImpl(2, 4, 6, g)); + listeIle.add(new IleImpl(2, 6, 3, g)); + listeIle.add(new IleImpl(4, 0, 2, g)); + listeIle.add(new IleImpl(4, 2, 6, g)); + listeIle.add(new IleImpl(4, 4, 4, g)); + listeIle.add(new IleImpl(6, 0, 1, g)); + listeIle.add(new IleImpl(6, 2, 2, g)); + listeIle.add(new IleImpl(6, 4, 2, g)); + + for (IleImpl i : listeIle) g.poserIle(i); assertTrue(Technique.TECH_ISO_1.test(listeIle.get(0))); @@ -372,19 +373,19 @@ public void testTechniqueIsolation1(){ * Test de la technique "Complétion" sans pont */ @Test - public void testTechniqueCompletion1(){ - - listeIle.add(new IleImpl(0,0,2,g)); - listeIle.add(new IleImpl(0,2,4,g)); - listeIle.add(new IleImpl(0,4,2,g)); - listeIle.add(new IleImpl(2,0,1,g)); - listeIle.add(new IleImpl(2,2,3,g)); - listeIle.add(new IleImpl(2,6,2,g)); - listeIle.add(new IleImpl(4,2,3,g)); - listeIle.add(new IleImpl(4,4,4,g)); - listeIle.add(new IleImpl(4,6,3,g)); - - for(IleImpl i : listeIle) + public void testTechniqueCompletion1() { + + listeIle.add(new IleImpl(0, 0, 2, g)); + listeIle.add(new IleImpl(0, 2, 4, g)); + listeIle.add(new IleImpl(0, 4, 2, g)); + listeIle.add(new IleImpl(2, 0, 1, g)); + listeIle.add(new IleImpl(2, 2, 3, g)); + listeIle.add(new IleImpl(2, 6, 2, g)); + listeIle.add(new IleImpl(4, 2, 3, g)); + listeIle.add(new IleImpl(4, 4, 4, g)); + listeIle.add(new IleImpl(4, 6, 3, g)); + + for (IleImpl i : listeIle) g.poserIle(i); assertFalse(Technique.TECH_COMPL.test(listeIle.get(0))); @@ -397,19 +398,19 @@ public void testTechniqueCompletion1(){ * Test de la technique "Complétion" avec pont */ @Test - public void testTechniqueCompletion2(){ - - listeIle.add(new IleImpl(0,0,2,g)); - listeIle.add(new IleImpl(0,2,4,g)); - listeIle.add(new IleImpl(0,4,2,g)); - listeIle.add(new IleImpl(2,0,1,g)); - listeIle.add(new IleImpl(2,2,3,g)); - listeIle.add(new IleImpl(2,6,2,g)); - listeIle.add(new IleImpl(4,2,3,g)); - listeIle.add(new IleImpl(4,4,4,g)); - listeIle.add(new IleImpl(4,6,3,g)); - - for(IleImpl i : listeIle) + public void testTechniqueCompletion2() { + + listeIle.add(new IleImpl(0, 0, 2, g)); + listeIle.add(new IleImpl(0, 2, 4, g)); + listeIle.add(new IleImpl(0, 4, 2, g)); + listeIle.add(new IleImpl(2, 0, 1, g)); + listeIle.add(new IleImpl(2, 2, 3, g)); + listeIle.add(new IleImpl(2, 6, 2, g)); + listeIle.add(new IleImpl(4, 2, 3, g)); + listeIle.add(new IleImpl(4, 4, 4, g)); + listeIle.add(new IleImpl(4, 6, 3, g)); + + for (IleImpl i : listeIle) g.poserIle(i); g.poserPont(listeIle.get(4), listeIle.get(5), 1); @@ -424,19 +425,19 @@ public void testTechniqueCompletion2(){ * Test de la technique "Complétion" avec plus de ponts encore */ @Test - public void testTechniqueCompletion3(){ - - listeIle.add(new IleImpl(0,0,2,g)); - listeIle.add(new IleImpl(0,2,4,g)); - listeIle.add(new IleImpl(0,4,2,g)); - listeIle.add(new IleImpl(2,0,1,g)); - listeIle.add(new IleImpl(2,2,3,g)); - listeIle.add(new IleImpl(2,6,2,g)); - listeIle.add(new IleImpl(4,2,3,g)); - listeIle.add(new IleImpl(4,4,4,g)); - listeIle.add(new IleImpl(4,6,3,g)); - - for(IleImpl i : listeIle) + public void testTechniqueCompletion3() { + + listeIle.add(new IleImpl(0, 0, 2, g)); + listeIle.add(new IleImpl(0, 2, 4, g)); + listeIle.add(new IleImpl(0, 4, 2, g)); + listeIle.add(new IleImpl(2, 0, 1, g)); + listeIle.add(new IleImpl(2, 2, 3, g)); + listeIle.add(new IleImpl(2, 6, 2, g)); + listeIle.add(new IleImpl(4, 2, 3, g)); + listeIle.add(new IleImpl(4, 4, 4, g)); + listeIle.add(new IleImpl(4, 6, 3, g)); + + for (IleImpl i : listeIle) g.poserIle(i); g.poserPont(listeIle.get(4), listeIle.get(5), 1); From 752e70ab23a6f7ebffba413feb557b891c1ae214 Mon Sep 17 00:00:00 2001 From: Antoine Date: Thu, 11 Apr 2024 16:25:08 +0200 Subject: [PATCH 03/31] =?UTF-8?q?Remplacement=20des=20Union=20par=20une=20?= =?UTF-8?q?classe=20plus=20g=C3=A9n=C3=A9rique?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: DamiBoul --- .../java/fr/hashimiste/core/jeu/Grille.java | 7 ++-- .../java/fr/hashimiste/core/utils/Union.java | 37 +++++++++++++++++++ .../hashimiste/core/utils/UnionIleString.java | 36 ------------------ .../core/utils/UnionIleTechnique.java | 37 ------------------- .../impl/gui/builder/GrilleBuilder.java | 7 ++-- .../java/fr/hashimiste/impl/gui/jeu/Jeu.java | 2 +- .../fr/hashimiste/impl/jeu/GrilleImpl.java | 21 +++++------ 7 files changed, 54 insertions(+), 93 deletions(-) create mode 100644 src/main/java/fr/hashimiste/core/utils/Union.java delete mode 100644 src/main/java/fr/hashimiste/core/utils/UnionIleString.java delete mode 100644 src/main/java/fr/hashimiste/core/utils/UnionIleTechnique.java diff --git a/src/main/java/fr/hashimiste/core/jeu/Grille.java b/src/main/java/fr/hashimiste/core/jeu/Grille.java index d3a7604..578f3f9 100644 --- a/src/main/java/fr/hashimiste/core/jeu/Grille.java +++ b/src/main/java/fr/hashimiste/core/jeu/Grille.java @@ -2,8 +2,7 @@ import fr.hashimiste.core.data.Stockage; import fr.hashimiste.core.data.sql.Identifiable; -import fr.hashimiste.core.utils.UnionIleString; -import fr.hashimiste.core.utils.UnionIleTechnique; +import fr.hashimiste.core.utils.Union; import java.awt.*; import java.util.List; @@ -70,14 +69,14 @@ public interface Grille extends Identifiable { * * @return L'île où l'aide peut s'appliquer et un message d'aide pour résoudre la grille. */ - UnionIleString aide(); + Union aide(); /** * Parcourt la grille à la recherche de l'île sur laquelle on peut appliquer une technique. * * @return une Ile avec la technique qui peut s'y appliquer. */ - UnionIleTechnique chercherIle(); + Union chercherIle(); /** * Récupère la difficulté de la grille. diff --git a/src/main/java/fr/hashimiste/core/utils/Union.java b/src/main/java/fr/hashimiste/core/utils/Union.java new file mode 100644 index 0000000..f08ef04 --- /dev/null +++ b/src/main/java/fr/hashimiste/core/utils/Union.java @@ -0,0 +1,37 @@ +package fr.hashimiste.core.utils; + +/** + * Représente une union de deux objets. + * @param objet gauche + * @param objet droit + */ +public class Union { + private final G gauche; + private final D droite; + + /** + * Crée une union. + * @param gauche l'objet gauche + * @param droite l'objet droit + */ + public Union(G gauche, D droite) { + this.gauche = gauche; + this.droite = droite; + } + + /** + * Renvoie l'objet gauche. + * @return l'objet gauche + */ + public G getGauche() { + return gauche; + } + + /** + * Renvoie l'objet droit. + * @return l'objet droit + */ + public D getDroite() { + return droite; + } +} diff --git a/src/main/java/fr/hashimiste/core/utils/UnionIleString.java b/src/main/java/fr/hashimiste/core/utils/UnionIleString.java deleted file mode 100644 index 48afd07..0000000 --- a/src/main/java/fr/hashimiste/core/utils/UnionIleString.java +++ /dev/null @@ -1,36 +0,0 @@ -package fr.hashimiste.core.utils; - -import fr.hashimiste.core.jeu.Ile; - -/** - * union d'une île et d'un string - */ -public class UnionIleString { - private final Ile ileU; - private final String strU; - - public UnionIleString(Ile i, String s) { - this.ileU = i; - this.strU = s; - } - - /** - * Renvoie l'île de l'union - * - * @return l'île de l'union - */ - public Ile getIleU() { - return this.ileU; - } - - /** - * Renvoie le string de l'union - * - * @return le string de l'union - */ - public String getStrU() { - return this.strU; - } - - -} diff --git a/src/main/java/fr/hashimiste/core/utils/UnionIleTechnique.java b/src/main/java/fr/hashimiste/core/utils/UnionIleTechnique.java deleted file mode 100644 index 6824bfc..0000000 --- a/src/main/java/fr/hashimiste/core/utils/UnionIleTechnique.java +++ /dev/null @@ -1,37 +0,0 @@ -package fr.hashimiste.core.utils; - -import fr.hashimiste.core.jeu.Ile; -import fr.hashimiste.core.jeu.Technique; - -/** - * Union d'une île et d'une technique - */ -public class UnionIleTechnique { - private final Ile ileU; - private final Technique techU; - - public UnionIleTechnique(Ile i, Technique t) { - this.ileU = i; - this.techU = t; - } - - /** - * Renvoie l'île de l'union - * - * @return l'île de l'union - */ - public Ile getIleU() { - return this.ileU; - } - - /** - * Renvoie la technique de l'union - * - * @return le technique de l'union - */ - public Technique getTechU() { - return this.techU; - } - - -} diff --git a/src/main/java/fr/hashimiste/impl/gui/builder/GrilleBuilder.java b/src/main/java/fr/hashimiste/impl/gui/builder/GrilleBuilder.java index a05988a..298e3a2 100644 --- a/src/main/java/fr/hashimiste/impl/gui/builder/GrilleBuilder.java +++ b/src/main/java/fr/hashimiste/impl/gui/builder/GrilleBuilder.java @@ -3,8 +3,7 @@ import fr.hashimiste.core.data.Stockage; import fr.hashimiste.core.data.sql.Identifiable; import fr.hashimiste.core.jeu.*; -import fr.hashimiste.core.utils.UnionIleString; -import fr.hashimiste.core.utils.UnionIleTechnique; +import fr.hashimiste.core.utils.Union; import java.awt.*; import java.util.Arrays; @@ -115,12 +114,12 @@ public boolean verification() { } @Override - public UnionIleString aide() { + public Union aide() { throw UNSUPPORTED_OPERATION_EXCEPTION; } @Override - public UnionIleTechnique chercherIle() { + public Union chercherIle() { throw UNSUPPORTED_OPERATION_EXCEPTION; } diff --git a/src/main/java/fr/hashimiste/impl/gui/jeu/Jeu.java b/src/main/java/fr/hashimiste/impl/gui/jeu/Jeu.java index 24a983c..3c34493 100644 --- a/src/main/java/fr/hashimiste/impl/gui/jeu/Jeu.java +++ b/src/main/java/fr/hashimiste/impl/gui/jeu/Jeu.java @@ -169,7 +169,7 @@ private void precedent() { * Cette méthode est utilisée pour obtenir de l'aide dans le jeu. */ private void aide() { //TODO comprendre pourquoi grille peut être nul sur certaines îles - JOptionPane.showMessageDialog(this, grille.aide().getStrU(), "Aide", JOptionPane.INFORMATION_MESSAGE); + JOptionPane.showMessageDialog(this, grille.aide().getDroite(), "Aide", JOptionPane.INFORMATION_MESSAGE); } /** diff --git a/src/main/java/fr/hashimiste/impl/jeu/GrilleImpl.java b/src/main/java/fr/hashimiste/impl/jeu/GrilleImpl.java index 3df214b..1f84712 100644 --- a/src/main/java/fr/hashimiste/impl/jeu/GrilleImpl.java +++ b/src/main/java/fr/hashimiste/impl/jeu/GrilleImpl.java @@ -3,8 +3,7 @@ import fr.hashimiste.core.data.Stockage; import fr.hashimiste.core.data.sql.Identifiable; import fr.hashimiste.core.jeu.*; -import fr.hashimiste.core.utils.UnionIleString; -import fr.hashimiste.core.utils.UnionIleTechnique; +import fr.hashimiste.core.utils.Union; import java.awt.*; import java.util.ArrayList; @@ -186,26 +185,26 @@ public boolean verification() { //TODO à implémenter } @Override - public UnionIleString aide() { - UnionIleTechnique uIT = this.chercherIle(); + public Union aide() { + Union uIT = this.chercherIle(); String mess = ""; - if (nbClicSurAide == 0) mess = "La " + uIT.getTechU().getNom() + " peut être utilisée !"; + if (nbClicSurAide == 0) mess = "La " + uIT.getDroite().getNom() + " peut être utilisée !"; if (nbClicSurAide == 1) - mess = "La " + uIT.getTechU().getNom() + " peut être utilisée : " + uIT.getTechU().getDescription(); + mess = "La " + uIT.getDroite().getNom() + " peut être utilisée : " + uIT.getDroite().getDescription(); if (nbClicSurAide == 2) - mess = "La " + uIT.getTechU().getNom() + " peut être utilisée dans la région " + uIT.getIleU().getRegion(); + mess = "La " + uIT.getDroite().getNom() + " peut être utilisée dans la région " + uIT.getGauche().getRegion(); if (nbClicSurAide > 2) - mess = "La " + uIT.getTechU().getNom() + " peut être utilisée en x = " + uIT.getIleU().getX() + " et en y = " + uIT.getIleU().getY(); + mess = "La " + uIT.getDroite().getNom() + " peut être utilisée en x = " + uIT.getGauche().getX() + " et en y = " + uIT.getGauche().getY(); System.out.println(mess); nbClicSurAide++; - return new UnionIleString(uIT.getIleU(), mess); + return new Union<>(uIT.getGauche(), mess); } @Override - public UnionIleTechnique chercherIle() { + public Union chercherIle() { if (this.verification()) return null; //TODO quand verification sera fait correctement, remettre le not au début else { @@ -233,7 +232,7 @@ public UnionIleTechnique chercherIle() { } } - return new UnionIleTechnique(aideIle, lTech[fIndMin]); + return new Union<>(aideIle, lTech[fIndMin]); } } From 7cf366ced365e1fb5886b95a11c131b807bd6d70 Mon Sep 17 00:00:00 2001 From: Antoine Date: Fri, 12 Apr 2024 12:45:58 +0200 Subject: [PATCH 04/31] =?UTF-8?q?Ajout=20la=20possibilit=C3=A9=20de=20pr?= =?UTF-8?q?=C3=A9ciser=20une=20arguments=20aux=20decodeurs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/fr/hashimiste/core/data/Decoder.java | 2 +- .../fr/hashimiste/core/data/Stockage.java | 20 +++++++++---------- .../hashimiste/core/data/sql/SQLDecoder.java | 3 +++ .../hashimiste/impl/data/sql/SQLStockage.java | 7 ++++--- .../impl/data/sql/decoder/GrilleDecoder.java | 11 ++++++++++ .../data/sql/decoder/HistoriqueDecoder.java | 6 ++++-- .../impl/data/sql/decoder/IleDecoder.java | 2 +- .../impl/data/sql/decoder/ProfilDecoder.java | 2 +- .../data/sql/decoder/SauvegardeDecoder.java | 5 +++-- .../data/sql/decoder/StatistiqueDecoder.java | 2 +- 10 files changed, 39 insertions(+), 21 deletions(-) diff --git a/src/main/java/fr/hashimiste/core/data/Decoder.java b/src/main/java/fr/hashimiste/core/data/Decoder.java index 46ab5fb..f0d159b 100644 --- a/src/main/java/fr/hashimiste/core/data/Decoder.java +++ b/src/main/java/fr/hashimiste/core/data/Decoder.java @@ -20,5 +20,5 @@ public interface Decoder { * @param input les données en entrée. * @return un nouvel objet de type T. */ - T creer(I input); + T creer(I input, Object... args); } \ No newline at end of file diff --git a/src/main/java/fr/hashimiste/core/data/Stockage.java b/src/main/java/fr/hashimiste/core/data/Stockage.java index 8f01d88..c5a8eff 100644 --- a/src/main/java/fr/hashimiste/core/data/Stockage.java +++ b/src/main/java/fr/hashimiste/core/data/Stockage.java @@ -19,7 +19,7 @@ public interface Stockage { * @param extra un paramètre supplémentaire pour la requête. * @return une liste d'objets de type T. */ - List charger(Class clazz, String extra); + List charger(Class clazz, String extra, Object... args); /** * Charge une liste d'objets de type T à partir du stockage en utilisant des jointures et un filtre. @@ -29,7 +29,7 @@ public interface Stockage { * @param filtre le filtre à utiliser. * @return une liste d'objets de type T. */ - List charger(Class clazz, List jointures, Filter filtre); + List charger(Class clazz, List jointures, Filter filtre, Object... args); /** * Charge une liste d'objets de type T à partir du stockage en utilisant des jointures. @@ -38,8 +38,8 @@ public interface Stockage { * @param jointures la liste des jointures à utiliser. * @return une liste d'objets de type T. */ - default List charger(Class clazz, List jointures) { - return charger(clazz, jointures, null); + default List charger(Class clazz, List jointures, Object... args) { + return charger(clazz, jointures, null, args); } /** @@ -49,8 +49,8 @@ default List charger(Class clazz, List jointures) { * @param filtre le filtre à utiliser. * @return une liste d'objets de type T. */ - default List charger(Class clazz, Filter filtre) { - return charger(clazz, null, filtre); + default List charger(Class clazz, Filter filtre, Object... args) { + return charger(clazz, null, filtre, args); } /** @@ -59,8 +59,8 @@ default List charger(Class clazz, Filter filtre) { * @param clazz la classe des objets à charger. * @return une liste d'objets de type T. */ - default List charger(Class clazz) { - return charger(clazz, null, null); + default List charger(Class clazz, Object... args) { + return charger(clazz, null, null, args); } /** @@ -70,8 +70,8 @@ default List charger(Class clazz) { * @param filtre le filtre à utiliser. * @return un objet de type T. */ - default T get(Class clazz, Filter filtre) { - return charger(clazz, null, filtre).stream().findFirst().orElse(null); + default T get(Class clazz, Filter filtre, Object... args) { + return charger(clazz, null, filtre, args).stream().filter(Objects::nonNull).findFirst().orElse(null); } /** diff --git a/src/main/java/fr/hashimiste/core/data/sql/SQLDecoder.java b/src/main/java/fr/hashimiste/core/data/sql/SQLDecoder.java index 051cf37..32a44a8 100644 --- a/src/main/java/fr/hashimiste/core/data/sql/SQLDecoder.java +++ b/src/main/java/fr/hashimiste/core/data/sql/SQLDecoder.java @@ -11,4 +11,7 @@ * @param le type d'objet à décoder. */ public interface SQLDecoder extends Decoder { + + default void apresCreation(T object, ResultSet statement) { + } } \ No newline at end of file diff --git a/src/main/java/fr/hashimiste/impl/data/sql/SQLStockage.java b/src/main/java/fr/hashimiste/impl/data/sql/SQLStockage.java index 20a20cc..a3aa39a 100644 --- a/src/main/java/fr/hashimiste/impl/data/sql/SQLStockage.java +++ b/src/main/java/fr/hashimiste/impl/data/sql/SQLStockage.java @@ -167,7 +167,7 @@ private void enregistrerDecodeurs() { * @throws RuntimeException si une erreur de base de données se produit. */ @Override - public List charger(Class clazz, String extra) { + public List charger(Class clazz, String extra, Object... args) { Assert.nonNull(clazz); if (!decoders.containsKey(clazz)) { throwNonGerer(clazz); @@ -180,6 +180,7 @@ public List charger(Class clazz, String extra) { T t = decoder.creer(rs); if (!cache.contains(t)) { list.add(t); + T t = decoder.creer(rs, args); } } } catch (SQLException e) { @@ -200,7 +201,7 @@ public List charger(Class clazz, String extra) { * @return une liste d'objets de la classe spécifiée, chargés à partir de la base de données. */ @Override - public List charger(Class clazz, List jointures, Filter filtre) { + public List charger(Class clazz, List jointures, Filter filtre, Object... args) { String extra = ""; if (jointures != null) { extra += " " + String.join(" ", jointures.stream().map(Join::getJointure).toArray(String[]::new)); @@ -208,7 +209,7 @@ public List charger(Class clazz, List jointures, Filter filtre) if (filtre != null) { extra += " WHERE " + filtre.getFiltre(); } - return charger(clazz, extra); + return charger(clazz, extra, args); } /** diff --git a/src/main/java/fr/hashimiste/impl/data/sql/decoder/GrilleDecoder.java b/src/main/java/fr/hashimiste/impl/data/sql/decoder/GrilleDecoder.java index 5c47f45..c4af9a1 100644 --- a/src/main/java/fr/hashimiste/impl/data/sql/decoder/GrilleDecoder.java +++ b/src/main/java/fr/hashimiste/impl/data/sql/decoder/GrilleDecoder.java @@ -63,4 +63,15 @@ public Grille creer(ResultSet input) { throw new RuntimeException(e); } } + + @Override + public void apresCreation(Grille grille, ResultSet statement) { + List iles = stockage.charger(Ile.class, new EqFilter("id_map", grille.getId())); + iles.forEach(((GrilleImpl) grille)::poserIle); + try { + ((GrilleImpl) grille).fetchSolution(stockage); + } catch (Exception e) { + e.printStackTrace(); + } + } } \ No newline at end of file diff --git a/src/main/java/fr/hashimiste/impl/data/sql/decoder/HistoriqueDecoder.java b/src/main/java/fr/hashimiste/impl/data/sql/decoder/HistoriqueDecoder.java index 29c4e34..ef36c56 100644 --- a/src/main/java/fr/hashimiste/impl/data/sql/decoder/HistoriqueDecoder.java +++ b/src/main/java/fr/hashimiste/impl/data/sql/decoder/HistoriqueDecoder.java @@ -5,10 +5,12 @@ import fr.hashimiste.core.jeu.Grille; import fr.hashimiste.core.jeu.Historique; import fr.hashimiste.core.jeu.Ile; +import fr.hashimiste.core.utils.DevUtils; import fr.hashimiste.impl.data.sql.SQLStockage; import fr.hashimiste.impl.data.sql.filter.EqFilter; import java.sql.ResultSet; +import java.sql.SQLException; import java.sql.Timestamp; /** @@ -44,7 +46,7 @@ public String getNomContaineur() { * @return l'Historique créé. */ @Override - public Historique creer(ResultSet input) { + public Historique creer(ResultSet input, Object... args) { try { Timestamp date = input.getTimestamp("date"); Historique avant = null; @@ -70,7 +72,7 @@ public Historique creer(ResultSet input) { } Historique.Action action = Historique.Action.values()[input.getInt("action")]; return new Historique(date, avant, map, ile1, ile2, action); - } catch (Exception e) { + } catch (SQLException e) { throw new RuntimeException(e); } } diff --git a/src/main/java/fr/hashimiste/impl/data/sql/decoder/IleDecoder.java b/src/main/java/fr/hashimiste/impl/data/sql/decoder/IleDecoder.java index 9886529..4c42fe8 100644 --- a/src/main/java/fr/hashimiste/impl/data/sql/decoder/IleDecoder.java +++ b/src/main/java/fr/hashimiste/impl/data/sql/decoder/IleDecoder.java @@ -43,7 +43,7 @@ public String getNomContaineur() { * @return l'Ile créée. */ @Override - public Ile creer(ResultSet input) { + public Ile creer(ResultSet input, Object... args) { try { int id = input.getInt("id_ile"); int idMap = input.getInt("id_map"); diff --git a/src/main/java/fr/hashimiste/impl/data/sql/decoder/ProfilDecoder.java b/src/main/java/fr/hashimiste/impl/data/sql/decoder/ProfilDecoder.java index 392cd0b..aa71f2b 100644 --- a/src/main/java/fr/hashimiste/impl/data/sql/decoder/ProfilDecoder.java +++ b/src/main/java/fr/hashimiste/impl/data/sql/decoder/ProfilDecoder.java @@ -41,7 +41,7 @@ public String getNomContaineur() { * @return le Profil créé. */ @Override - public Profil creer(ResultSet input) { + public Profil creer(ResultSet input, Object... args) { try { return new ProfilImpl(stockage, input.getInt("id_profil"), input.getString("nom")); } catch (SQLException e) { diff --git a/src/main/java/fr/hashimiste/impl/data/sql/decoder/SauvegardeDecoder.java b/src/main/java/fr/hashimiste/impl/data/sql/decoder/SauvegardeDecoder.java index 7c8be37..0e149b2 100644 --- a/src/main/java/fr/hashimiste/impl/data/sql/decoder/SauvegardeDecoder.java +++ b/src/main/java/fr/hashimiste/impl/data/sql/decoder/SauvegardeDecoder.java @@ -10,6 +10,7 @@ import fr.hashimiste.impl.jeu.SauvegardeImpl; import java.sql.ResultSet; +import java.sql.SQLException; import java.sql.Timestamp; /** @@ -46,7 +47,7 @@ public String getNomContaineur() { * @return la Sauvegarde créée. */ @Override - public Sauvegarde creer(ResultSet input) { + public Sauvegarde creer(ResultSet input, Object... args) { try { Timestamp tsReference = input.getTimestamp("reference"); Historique reference = ((SQLStockage) stockage).getDepuisCache(Historique.class, m -> m.getTimestamp().equals(tsReference)) @@ -56,7 +57,7 @@ public Sauvegarde creer(ResultSet input) { Profil profil = ((SQLStockage) stockage).getDepuisCache(Profil.class, m -> m.getId() == idProfil) .orElseGet(() -> stockage.get(Profil.class, new EqFilter("id_profil", idProfil))); return new SauvegardeImpl(profil, nom, reference); - } catch (Exception e) { + } catch (SQLException e) { throw new RuntimeException(e); } } diff --git a/src/main/java/fr/hashimiste/impl/data/sql/decoder/StatistiqueDecoder.java b/src/main/java/fr/hashimiste/impl/data/sql/decoder/StatistiqueDecoder.java index 9efbfa4..7420e31 100644 --- a/src/main/java/fr/hashimiste/impl/data/sql/decoder/StatistiqueDecoder.java +++ b/src/main/java/fr/hashimiste/impl/data/sql/decoder/StatistiqueDecoder.java @@ -41,7 +41,7 @@ public String getNomContaineur() { * @return la Statistique créée. */ @Override - public Statistique creer(ResultSet input) { + public Statistique creer(ResultSet input, Object... args) { try { return new StatistiqueImpl( stockage, From aa2ed583400fd4c720e2405ec32f5fced7d0c50a Mon Sep 17 00:00:00 2001 From: Antoine Date: Fri, 12 Apr 2024 12:48:08 +0200 Subject: [PATCH 05/31] Modification du fonctionnement du cache --- .../java/fr/hashimiste/core/data/Decoder.java | 4 ++++ .../fr/hashimiste/core/data/Stockage.java | 1 + .../hashimiste/impl/data/sql/SQLStockage.java | 23 +++++++++++++------ .../impl/data/sql/decoder/GrilleDecoder.java | 9 +++++--- .../data/sql/decoder/HistoriqueDecoder.java | 5 ++++ .../impl/data/sql/decoder/IleDecoder.java | 5 ++++ .../impl/data/sql/decoder/ProfilDecoder.java | 5 ++++ .../data/sql/decoder/StatistiqueDecoder.java | 5 ++++ 8 files changed, 47 insertions(+), 10 deletions(-) diff --git a/src/main/java/fr/hashimiste/core/data/Decoder.java b/src/main/java/fr/hashimiste/core/data/Decoder.java index f0d159b..453b6aa 100644 --- a/src/main/java/fr/hashimiste/core/data/Decoder.java +++ b/src/main/java/fr/hashimiste/core/data/Decoder.java @@ -14,6 +14,10 @@ public interface Decoder { */ String getNomContaineur(); + default String getIdColonne() { + return null; + } + /** * Crée un nouvel objet de type T à partir des données en entrée. * diff --git a/src/main/java/fr/hashimiste/core/data/Stockage.java b/src/main/java/fr/hashimiste/core/data/Stockage.java index c5a8eff..739291c 100644 --- a/src/main/java/fr/hashimiste/core/data/Stockage.java +++ b/src/main/java/fr/hashimiste/core/data/Stockage.java @@ -5,6 +5,7 @@ import java.util.ArrayList; import java.util.List; +import java.util.Objects; import java.util.function.Supplier; /** diff --git a/src/main/java/fr/hashimiste/impl/data/sql/SQLStockage.java b/src/main/java/fr/hashimiste/impl/data/sql/SQLStockage.java index a3aa39a..2ebc3e7 100644 --- a/src/main/java/fr/hashimiste/impl/data/sql/SQLStockage.java +++ b/src/main/java/fr/hashimiste/impl/data/sql/SQLStockage.java @@ -5,6 +5,7 @@ import fr.hashimiste.core.data.Join; import fr.hashimiste.core.data.Stockage; import fr.hashimiste.core.data.sql.Identifiable; +import fr.hashimiste.core.data.sql.SQLDecoder; import fr.hashimiste.core.data.sql.SQLEncoder; import fr.hashimiste.core.jeu.Grille; import fr.hashimiste.core.jeu.Historique; @@ -30,7 +31,7 @@ public class SQLStockage implements Stockage { private final Connection connection; private final Map, Decoder> decoders = new HashMap<>(); private final Map, SQLEncoder> encoders = new HashMap<>(); - private final Map, List> caches = new HashMap<>(); + private final Map, List> caches = new HashMap<>(); /** * Constructeur de SQLStockage. @@ -177,18 +178,26 @@ public List charger(Class clazz, String extra, Object... args) { List cache = getCache(clazz); try (ResultSet rs = executeQuery("SELECT * FROM " + decoder.getNomContaineur() + (extra == null ? "" : " " + extra))) { while (rs.next()) { - T t = decoder.creer(rs); - if (!cache.contains(t)) { - list.add(t); + if (decoder.getIdColonne() != null) { + int id = rs.getInt(decoder.getIdColonne()); + Optional optional = cache.stream().filter(t -> t instanceof Identifiable && ((Identifiable) t).getId() == id).findFirst(); + if (optional.isPresent()) { + list.add(optional.get()); + continue; + } + } T t = decoder.creer(rs, args); + list.add(t); + if (t instanceof Identifiable) { + cache.add(t); } + ((SQLDecoder) decoder).apresCreation(t, rs); } } catch (SQLException e) { throw new RuntimeException(e); } - cache.clear(); cache.addAll(list); - return cache; + return list; } /** @@ -319,7 +328,7 @@ public Optional getDepuisCache(Class clazz, Predicate filtre) { throwNonGerer(clazz); } List cache = getCache(clazz); - return cache.stream().filter(filtre).findFirst(); + return cache.stream().filter(Objects::nonNull).filter(filtre).findFirst(); } /** diff --git a/src/main/java/fr/hashimiste/impl/data/sql/decoder/GrilleDecoder.java b/src/main/java/fr/hashimiste/impl/data/sql/decoder/GrilleDecoder.java index c4af9a1..e25fac7 100644 --- a/src/main/java/fr/hashimiste/impl/data/sql/decoder/GrilleDecoder.java +++ b/src/main/java/fr/hashimiste/impl/data/sql/decoder/GrilleDecoder.java @@ -39,6 +39,11 @@ public String getNomContaineur() { return "map"; } + @Override + public String getIdColonne() { + return "id_map"; + } + /** * Crée une Grille à partir d'un ResultSet SQL. * @@ -46,18 +51,16 @@ public String getNomContaineur() { * @return la Grille créée. */ @Override - public Grille creer(ResultSet input) { + public Grille creer(ResultSet input, Object... args) { try { int id = input.getInt("id_map"); - String nom = input.getString("nom"); Difficulte difficulte = Difficulte.values()[input.getInt("difficulte")]; int largeur = input.getInt("largeur"); int hauteur = input.getInt("hauteur"); boolean estAventure = input.getBoolean("aventure"); GrilleImpl grille = new GrilleImpl(id, new Dimension(largeur, hauteur), difficulte, estAventure); List iles = stockage.charger(Ile.class, new EqFilter("id_map", id)); - iles.forEach(grille::poserIle); return grille; } catch (SQLException e) { throw new RuntimeException(e); diff --git a/src/main/java/fr/hashimiste/impl/data/sql/decoder/HistoriqueDecoder.java b/src/main/java/fr/hashimiste/impl/data/sql/decoder/HistoriqueDecoder.java index ef36c56..d1ca79a 100644 --- a/src/main/java/fr/hashimiste/impl/data/sql/decoder/HistoriqueDecoder.java +++ b/src/main/java/fr/hashimiste/impl/data/sql/decoder/HistoriqueDecoder.java @@ -39,6 +39,11 @@ public String getNomContaineur() { return "historique"; } + @Override + public String getIdColonne() { + return "date"; + } + /** * Crée un Historique à partir d'un ResultSet SQL. * diff --git a/src/main/java/fr/hashimiste/impl/data/sql/decoder/IleDecoder.java b/src/main/java/fr/hashimiste/impl/data/sql/decoder/IleDecoder.java index 4c42fe8..c3d6ea4 100644 --- a/src/main/java/fr/hashimiste/impl/data/sql/decoder/IleDecoder.java +++ b/src/main/java/fr/hashimiste/impl/data/sql/decoder/IleDecoder.java @@ -36,6 +36,11 @@ public String getNomContaineur() { return "ile"; } + @Override + public String getIdColonne() { + return "id_ile"; + } + /** * Crée une Ile à partir d'un ResultSet SQL. * diff --git a/src/main/java/fr/hashimiste/impl/data/sql/decoder/ProfilDecoder.java b/src/main/java/fr/hashimiste/impl/data/sql/decoder/ProfilDecoder.java index aa71f2b..ccda052 100644 --- a/src/main/java/fr/hashimiste/impl/data/sql/decoder/ProfilDecoder.java +++ b/src/main/java/fr/hashimiste/impl/data/sql/decoder/ProfilDecoder.java @@ -34,6 +34,11 @@ public String getNomContaineur() { return "profil"; } + @Override + public String getIdColonne() { + return "id_profil"; + } + /** * Crée un Profil à partir d'un ResultSet SQL. * diff --git a/src/main/java/fr/hashimiste/impl/data/sql/decoder/StatistiqueDecoder.java b/src/main/java/fr/hashimiste/impl/data/sql/decoder/StatistiqueDecoder.java index 7420e31..db055f1 100644 --- a/src/main/java/fr/hashimiste/impl/data/sql/decoder/StatistiqueDecoder.java +++ b/src/main/java/fr/hashimiste/impl/data/sql/decoder/StatistiqueDecoder.java @@ -34,6 +34,11 @@ public String getNomContaineur() { return "statistique"; } + @Override + public String getIdColonne() { + return "id_stat"; + } + /** * Crée une Statistique à partir d'un ResultSet SQL. * From cbcf1f998b27d17b453c6c4a9a0b9abf89838f5b Mon Sep 17 00:00:00 2001 From: Antoine Date: Fri, 12 Apr 2024 12:53:19 +0200 Subject: [PATCH 06/31] =?UTF-8?q?Changement=20dans=20le=20chargement=20des?= =?UTF-8?q?=20maps,=20abilit=C3=A9=20a=20trouver=20une=20soluttion=20parmi?= =?UTF-8?q?=20elle=20enregistr=C3=A9=20et=20de=20v=C3=A9rifier=20la=20gril?= =?UTF-8?q?le?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/fr/hashimiste/core/jeu/Grille.java | 19 ++ .../impl/data/sql/decoder/GrilleDecoder.java | 4 +- .../impl/gui/builder/GrilleBuilder.java | 15 ++ .../fr/hashimiste/impl/jeu/GrilleImpl.java | 177 +++++++++++++++--- 4 files changed, 183 insertions(+), 32 deletions(-) diff --git a/src/main/java/fr/hashimiste/core/jeu/Grille.java b/src/main/java/fr/hashimiste/core/jeu/Grille.java index 578f3f9..476a7c1 100644 --- a/src/main/java/fr/hashimiste/core/jeu/Grille.java +++ b/src/main/java/fr/hashimiste/core/jeu/Grille.java @@ -84,4 +84,23 @@ public interface Grille extends Identifiable { * @return la difficulté de la grille. */ Difficulte getDifficulte(); + + /** + * Indique si la grille est jouable. + * + * @return vrai si la grille est jouable, faux sinon. + */ + boolean estJouable(); + + /** + * Réinitialise la grille. + */ + void reset(); + + /** + * Charge une sauvegarde. + * + * @param sauvegarde la sauvegarde a chargé. + */ + void chargerSauvegarde(Sauvegarde sauvegarde); } \ No newline at end of file diff --git a/src/main/java/fr/hashimiste/impl/data/sql/decoder/GrilleDecoder.java b/src/main/java/fr/hashimiste/impl/data/sql/decoder/GrilleDecoder.java index e25fac7..a746c44 100644 --- a/src/main/java/fr/hashimiste/impl/data/sql/decoder/GrilleDecoder.java +++ b/src/main/java/fr/hashimiste/impl/data/sql/decoder/GrilleDecoder.java @@ -59,8 +59,8 @@ public Grille creer(ResultSet input, Object... args) { int largeur = input.getInt("largeur"); int hauteur = input.getInt("hauteur"); boolean estAventure = input.getBoolean("aventure"); - GrilleImpl grille = new GrilleImpl(id, new Dimension(largeur, hauteur), difficulte, estAventure); - List iles = stockage.charger(Ile.class, new EqFilter("id_map", id)); + boolean estJouable = input.getBoolean("jouable"); + GrilleImpl grille = new GrilleImpl(id, new Dimension(largeur, hauteur), difficulte, estAventure, estJouable, stockage); return grille; } catch (SQLException e) { throw new RuntimeException(e); diff --git a/src/main/java/fr/hashimiste/impl/gui/builder/GrilleBuilder.java b/src/main/java/fr/hashimiste/impl/gui/builder/GrilleBuilder.java index 298e3a2..8a8e15d 100644 --- a/src/main/java/fr/hashimiste/impl/gui/builder/GrilleBuilder.java +++ b/src/main/java/fr/hashimiste/impl/gui/builder/GrilleBuilder.java @@ -157,4 +157,19 @@ public GrilleBuilder ajouterIle(Ile ile) { public void clear() { this.iles = new Ile[dimension.width][dimension.height]; } + + @Override + public boolean estJouable() { + return false; + } + + @Override + public void reset() { + throw UNSUPPORTED_OPERATION_EXCEPTION; + } + + @Override + public void chargerSauvegarde(Sauvegarde sauvegarde) { + throw UNSUPPORTED_OPERATION_EXCEPTION; + } } \ No newline at end of file diff --git a/src/main/java/fr/hashimiste/impl/jeu/GrilleImpl.java b/src/main/java/fr/hashimiste/impl/jeu/GrilleImpl.java index 1f84712..2854e8e 100644 --- a/src/main/java/fr/hashimiste/impl/jeu/GrilleImpl.java +++ b/src/main/java/fr/hashimiste/impl/jeu/GrilleImpl.java @@ -3,13 +3,13 @@ import fr.hashimiste.core.data.Stockage; import fr.hashimiste.core.data.sql.Identifiable; import fr.hashimiste.core.jeu.*; +import fr.hashimiste.core.utils.DevUtils; import fr.hashimiste.core.utils.Union; import java.awt.*; -import java.util.ArrayList; -import java.util.Arrays; import java.util.List; -import java.util.Objects; +import java.util.*; +import java.util.function.Consumer; import java.util.stream.Collectors; /** @@ -21,6 +21,8 @@ public class GrilleImpl implements Grille, Identifiable.UNSAFE { private final Case[][] iles; private final Difficulte difficulte; private final boolean estAventure; + private final boolean estJouable; + private Grille solution; private List sauvegardes; /** * Indique le nombre de fois que l'utilisateur à cliqué sur le bouton d'aide d'affilée. @@ -34,9 +36,10 @@ public class GrilleImpl implements Grille, Identifiable.UNSAFE { * * @param dimension la dimension de la grille. * @param difficulte la difficulté de la grille. + * @param stockage */ - public GrilleImpl(Dimension dimension, Difficulte difficulte, boolean estAventure) { - this(-1, dimension, difficulte, estAventure, new ArrayList<>()); + public GrilleImpl(Dimension dimension, Difficulte difficulte, boolean estAventure, boolean estJouable, Stockage stockage) { + this(-1, dimension, difficulte, estAventure, estJouable, stockage, new ArrayList<>()); } /** @@ -45,9 +48,11 @@ public GrilleImpl(Dimension dimension, Difficulte difficulte, boolean estAventur * @param id l'identifiant de la grille. * @param dimension la dimension de la grille. * @param difficulte la difficulté de la grille. + * @param estJouable + * @param stockage */ - public GrilleImpl(int id, Dimension dimension, Difficulte difficulte, boolean estAventure) { - this(id, dimension, difficulte, estAventure, null); + public GrilleImpl(int id, Dimension dimension, Difficulte difficulte, boolean estAventure, boolean estJouable, Stockage stockage) { + this(id, dimension, difficulte, estAventure, estJouable, stockage, null); } /** @@ -56,9 +61,11 @@ public GrilleImpl(int id, Dimension dimension, Difficulte difficulte, boolean es * @param id l'identifiant de la grille. * @param dimension la dimension de la grille. * @param difficulte la difficulté de la grille. + * @param estJouable + * @param stockage * @param sauvegardes la liste des sauvegardes de la grille. */ - public GrilleImpl(int id, Dimension dimension, Difficulte difficulte, boolean estAventure, List sauvegardes) { + public GrilleImpl(int id, Dimension dimension, Difficulte difficulte, boolean estAventure, boolean estJouable, Stockage stockage, List sauvegardes) { this.id = id; this.dimension = dimension; this.iles = new Case[dimension.width][dimension.height]; @@ -69,6 +76,7 @@ public GrilleImpl(int id, Dimension dimension, Difficulte difficulte, boolean es } this.difficulte = difficulte; this.estAventure = estAventure; + this.estJouable = estJouable; this.sauvegardes = sauvegardes; } @@ -111,39 +119,53 @@ protected void viderGrille() { * @param n le nombre de ponts à poser. */ public void poserPont(Ile ile1, Ile ile2, int n) { - Direction d = null; - Case temp = ile1; - - for (Direction value : Direction.values()) { + Consumer consumer = v -> { + }; + if (ile1.getX() == ile2.getX()) { + for (int i = Math.min(ile1.getY(), ile2.getY()) + 1; i < Math.max(ile1.getY(), ile2.getY()); i++) { + if (iles[ile1.getX()][i] instanceof Pont) { + return; + } + int fI = i; + consumer = consumer.andThen(v -> iles[ile1.getX()][fI] = new PontImpl(ile1.getX(), fI, n, this, Direction.NORD, ile1, ile2)); + } - if (ile1.isVoisinDirection(value)) { - if (ile1.getVoisinCase(value).getVoisinIle(value) == ile2) { - d = value; - break; + } else if (ile1.getY() == ile2.getY()) { + for (int i = Math.min(ile1.getX(), ile2.getX()) + 1; i < Math.max(ile1.getX(), ile2.getX()); i++) { + if (iles[i][ile1.getY()] instanceof Pont) { + return; } + int fI = i; + consumer = consumer.andThen(v -> iles[fI][ile1.getY()] = new PontImpl(fI, ile1.getY(), n, this, Direction.EST, ile1, ile2)); } } + consumer.accept(null); + } - if (d != null) { - temp = temp.getVoisinCase(d); - while (temp != ile2 && !(temp instanceof PontImpl)) { - temp = temp.getVoisinCase(d); + public void supprimerPont(Ile ile1, Ile ile2) { + Consumer consumer = v -> { + }; + if (ile1.getX() == ile2.getX()) { + for (int i = Math.min(ile1.getY(), ile2.getY()) + 1; i < Math.max(ile1.getY(), ile2.getY()); i++) { + if (iles[ile1.getX()][i] instanceof Pont) { + int fI = i; + consumer = consumer.andThen(v -> iles[ile1.getX()][fI] = new CaseVideImpl(ile1.getX(), fI, this)); + } } - - if (!(temp instanceof PontImpl)) { - temp = ile1.getVoisinCase(d); - while (temp != ile2) { - iles[temp.getX()][temp.getY()] = new PontImpl(temp.getX(), temp.getY(), n, this, d); - temp = temp.getVoisinCase(d); + } else if (ile1.getY() == ile2.getY()) { + for (int i = Math.min(ile1.getX(), ile2.getX()) + 1; i < Math.max(ile1.getX(), ile2.getX()); i++) { + if (iles[i][ile1.getY()] instanceof Pont) { + int fI = i; + consumer = consumer.andThen(v -> iles[fI][ile1.getY()] = new CaseVideImpl(fI, ile1.getY(), this)); } } - nbClicSurAide = 0; //si un pont a été posé, on réinitialise le compteur de clic sur aide } + consumer.accept(null); } @Override public Case getIle(int x, int y) { - return iles[x][y]; + return x < 0 || x >= dimension.width || y < 0 || y >= dimension.height ? null : iles[x][y]; } @Override @@ -180,7 +202,43 @@ public void rafraichirSauvegardes(Stockage stockage) { } @Override - public boolean verification() { //TODO à implémenter + public boolean verification() { // TODO: a réadapter + if (solution == null) { + DevUtils.debug("No solution found for this map. Verifying with n of islands."); + for (Case[] ile : iles) { + for (Case aCase : ile) { + if (aCase instanceof Ile) { + Ile ile1 = (Ile) aCase; + if (!ile1.isComplete()) { + DevUtils.debug("L'île en x = " + ile1.getX() + " et y = " + ile1.getY() + " n'est pas complète. {" + ile1 + "}"); + return false; + } + } + } + } + } else { + DevUtils.debug("Solution found for this map. Verifying with solution."); + return equals(solution); + } + return true; + } + + @Override + public boolean equals(Object obj) { + if (obj instanceof Grille) { + Grille grille = (Grille) obj; + if (!dimension.equals(grille.getDimension())) { + return false; + } + for (int i = 0; i < dimension.width; i++) { + for (int j = 0; j < dimension.height; j++) { + if (!getIle(i, j).equals(grille.getIle(i, j))) { + return false; + } + } + } + return true; + } return false; } @@ -205,7 +263,6 @@ public Union aide() { @Override public Union chercherIle() { - if (this.verification()) return null; //TODO quand verification sera fait correctement, remettre le not au début else { Technique[] lTech = Technique.values(); @@ -237,6 +294,11 @@ public Union chercherIle() { } } + @Override + public boolean estJouable() { + return estJouable; + } + @Override public int getId() { if (id == -1) { @@ -264,4 +326,59 @@ public String toString() { ", iles=" + Arrays.toString(iles) + '}'; } + + @Override + public void reset() { + for (int i = 0; i < dimension.width; i++) { + for (int j = 0; j < dimension.height; j++) { + if (!(iles[i][j] instanceof Ile) && !(iles[i][j] instanceof CaseVide)) { + iles[i][j] = new CaseVideImpl(i, j, this); + } + } + } + } + + @Override + public void chargerSauvegarde(Sauvegarde sauvegarde) { + if (sauvegarde.getGrille().getId() != id) { + throw new IllegalArgumentException("La sauvegarde ne correspond pas à cette grille."); + } + reset(); + Historique historique = sauvegarde.getReference(); + List historiques = new ArrayList<>(); + while (historique.getAction() != Historique.Action.NOUVELLE_GRILLE) { + historiques.add(historique); + historique = historique.getAvant(); + } + historiques.sort(Comparator.comparing(Historique::getTimestamp)); + for (Historique histo : historiques) { + if (histo.getAction() == Historique.Action.UN_PONT) { + poserPont(histo.getIle1(), histo.getIle2(), 1); + } else if (histo.getAction() == Historique.Action.DEUX_PONTS) { + poserPont(histo.getIle1(), histo.getIle2(), 2); + } else { + supprimerPont(histo.getIle1(), histo.getIle2()); + } + } + } + + /** + * Recherche la solution de la grille. + * @param stockage le stockage à utiliser pour charger les données. + */ + public void fetchSolution(Stockage stockage) { + Sauvegarde sauvegarde = getSauvegardes(stockage) + .stream() + .filter(s -> s.getProfil().getId() == 1 && s.getNom().equals("Solution " + id)) + .findFirst() + .orElseThrow(() -> new IllegalStateException("La solution n'a pas été trouvée.")); + this.solution = new GrilleImpl(id, dimension, difficulte, estAventure, estJouable, stockage); + for (Case ile : getIles()) { + if (ile instanceof Ile) { + Ile i = (Ile) ile; + ((GrilleImpl) this.solution).poserIle(new IleImpl(i.getX(), i.getY(), i.getN(), this.solution)); + } + } + this.solution.chargerSauvegarde(sauvegarde); + } } \ No newline at end of file From f396f80df14a76bbde8d64473ef177306fd4cb47 Mon Sep 17 00:00:00 2001 From: Antoine Date: Fri, 12 Apr 2024 12:58:44 +0200 Subject: [PATCH 07/31] =?UTF-8?q?Donn=C3=A9e=20par=20d=C3=A9faut=20de=20la?= =?UTF-8?q?=20base=20de=20donn=C3=A9e,=20modification=20de=20la=20table=20?= =?UTF-8?q?map?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hashimiste/impl/data/sql/SQLStockage.java | 32 +- src/main/resources/sql/startup.sql | 1145 +++++++++++++++++ 2 files changed, 1176 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/sql/startup.sql diff --git a/src/main/java/fr/hashimiste/impl/data/sql/SQLStockage.java b/src/main/java/fr/hashimiste/impl/data/sql/SQLStockage.java index 2ebc3e7..e03e97a 100644 --- a/src/main/java/fr/hashimiste/impl/data/sql/SQLStockage.java +++ b/src/main/java/fr/hashimiste/impl/data/sql/SQLStockage.java @@ -44,6 +44,7 @@ public SQLStockage(Connection connection) { enregistrerDecodeurs(); try { miseEnPlaceTable(); + miseEnPlaceDonnee(); } catch (SQLException e) { System.err.println("Erreur lors de la création des tables"); e.printStackTrace(); @@ -71,6 +72,7 @@ public SQLStockage(String driver, String url) throws ClassNotFoundException, NoS enregistrerDecodeurs(); try { miseEnPlaceTable(); + miseEnPlaceDonnee(); } catch (SQLException e) { System.err.println("Erreur lors de la création des tables"); throw new RuntimeException(e); @@ -86,7 +88,7 @@ public SQLStockage(String driver, String url) throws ClassNotFoundException, NoS private void miseEnPlaceTable() throws SQLException { creerTable("profil", "id_profil INTEGER PRIMARY KEY AUTOINCREMENT", "nom TEXT"); creerTable("statistique", new String[]{"id_stat INTEGER PRIMARY KEY AUTOINCREMENT", "id_profil INTEGER REFERENCES profil", "nom TEXT", "id_entity INTEGER", "valeur INTEGER"}, null, new String[]{"id_stat", "id_profil", "nom", "id_entity"}); - creerTable("map", "id_map INTEGER PRIMARY KEY AUTOINCREMENT", "nom TEXT", "difficulte INTEGER", "largeur INTEGER", "hauteur INTEGER", "aventure INTEGER"); + creerTable("map", "id_map INTEGER PRIMARY KEY AUTOINCREMENT", "difficulte INTEGER", "largeur INTEGER", "hauteur INTEGER", "aventure INTEGER DEFAULT 0", "jouable INTEGER DEFAULT 1"); creerTable("ile", "id_ile INTEGER PRIMARY KEY AUTOINCREMENT", "id_map INTEGER REFERENCES map", "x INTEGER", "y INTEGER", "n INTEGER"); creerTable("historique", new String[]{"date TIMESTAMP", "id_map INTEGER REFERENCES map", "id_ile1 INTEGER REFERENCES ile", "id_ile2 INTEGER REFERENCES ile", "action INTEGER", "avant TIMESTAMP NULL REFERENCES historique(date)"}, new String[]{"date"}, null); creerTable("sauvegarde", new String[]{"id_profil INTEGER REFERENCES profil", "nom TEXT", "reference TIMESTAMP REFERENCES historique(date)"}, new String[]{"id_profil", "nom"}, new String[]{"id_profil", "nom"}); @@ -131,6 +133,34 @@ private void creerTable(String nom, String[] colonne, String[] clePrimaire, Stri } } + /** + * Cette méthode privée est utilisée pour charger les données de démarrage dans la base de données. + * + * @throws SQLException si une erreur de base de données se produit. + */ + private void miseEnPlaceDonnee() throws SQLException { + try (InputStream is = getClass().getResourceAsStream("/sql/startup.sql"); + BufferedReader reader = new BufferedReader(new InputStreamReader(Objects.requireNonNull(is)))) { + StringBuilder sb = new StringBuilder(); + String line; + while ((line = reader.readLine()) != null) { + sb.append(line).append("\n"); + } + for (String query : sb.toString().split("\n")) { + query = query.trim(); + if (query.isEmpty() || query.startsWith("--")) { + continue; + } + try (Statement stmt = connection.createStatement()) { + logQuery(query, 1); + stmt.execute(query); + } + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + /** * Cette méthode privée est utilisée pour enregistrer les encodeurs pour chaque classe de données. * Chaque classe de données est associée à un encodeur spécifique qui est utilisé pour convertir les objets de cette classe en une forme qui peut être stockée dans la base de données. diff --git a/src/main/resources/sql/startup.sql b/src/main/resources/sql/startup.sql new file mode 100644 index 0000000..c67ea85 --- /dev/null +++ b/src/main/resources/sql/startup.sql @@ -0,0 +1,1145 @@ +-- Insert system profile +INSERT OR IGNORE INTO profil (`id_profil`, `nom`) +VALUES (1, 'system'); + +-- Insert ile +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1, 1, 0, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (2, 1, 0, 2, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (3, 1, 0, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (4, 1, 0, 6, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (5, 1, 0, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (6, 1, 1, 1, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (7, 1, 1, 3, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (8, 1, 1, 5, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (9, 1, 1, 7, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (10, 1, 1, 9, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (11, 1, 2, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (12, 1, 2, 6, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (13, 1, 2, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (14, 1, 3, 1, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (15, 1, 3, 3, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (16, 1, 3, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (17, 1, 4, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (18, 1, 4, 5, 7); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (19, 1, 4, 7, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (20, 1, 5, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (21, 1, 5, 8, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (22, 1, 6, 1, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (23, 1, 6, 3, 6); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (24, 1, 6, 5, 6); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (25, 1, 7, 7, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (26, 1, 7, 9, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (27, 1, 8, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (28, 1, 8, 3, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (29, 1, 8, 5, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (30, 1, 8, 8, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (31, 1, 9, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (32, 1, 9, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (33, 1, 9, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (34, 1, 9, 9, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (35, 1, 0, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (36, 1, 0, 2, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (37, 1, 0, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (38, 1, 0, 6, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (39, 1, 0, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (40, 1, 1, 1, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (41, 1, 1, 3, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (42, 1, 1, 5, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (43, 1, 1, 7, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (44, 1, 1, 9, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (45, 1, 2, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (46, 1, 2, 6, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (47, 1, 2, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (48, 1, 3, 1, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (49, 1, 3, 3, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (50, 1, 3, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (51, 1, 4, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (52, 1, 4, 5, 7); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (53, 1, 4, 7, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (54, 1, 5, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (55, 1, 5, 8, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (56, 1, 6, 1, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (57, 1, 6, 3, 6); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (58, 1, 6, 5, 6); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (59, 1, 7, 7, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (60, 1, 7, 9, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (61, 1, 8, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (62, 1, 8, 3, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (63, 1, 8, 5, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (64, 1, 8, 8, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (65, 1, 9, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (66, 1, 9, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (67, 1, 9, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (68, 1, 9, 9, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (69, 2, 0, 1, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (70, 2, 0, 3, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (71, 2, 0, 6, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (72, 2, 2, 0, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (73, 2, 2, 2, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (74, 2, 2, 5, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (75, 2, 3, 6, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (76, 2, 4, 0, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (77, 2, 4, 2, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (78, 2, 4, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (79, 2, 5, 3, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (80, 2, 5, 5, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (81, 2, 6, 0, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (82, 2, 6, 2, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (83, 2, 6, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (84, 2, 6, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (85, 3, 0, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (86, 3, 0, 3, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (87, 3, 0, 5, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (88, 3, 0, 7, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (89, 3, 1, 1, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (90, 3, 1, 4, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (91, 3, 1, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (92, 3, 2, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (93, 3, 2, 5, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (94, 3, 2, 7, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (95, 3, 3, 2, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (96, 3, 3, 4, 8); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (97, 3, 3, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (98, 3, 4, 1, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (99, 3, 5, 0, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (100, 3, 5, 2, 6); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (101, 3, 5, 4, 7); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (102, 3, 5, 7, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (103, 3, 7, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (104, 3, 7, 2, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (105, 3, 7, 4, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (106, 3, 7, 7, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (107, 4, 0, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (108, 4, 0, 2, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (109, 4, 0, 5, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (110, 4, 0, 7, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (111, 4, 1, 1, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (112, 4, 1, 4, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (113, 4, 1, 6, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (114, 4, 2, 7, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (115, 4, 3, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (116, 4, 3, 2, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (117, 4, 3, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (118, 4, 3, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (119, 4, 4, 1, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (120, 4, 4, 3, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (121, 4, 4, 5, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (122, 4, 4, 7, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (123, 4, 5, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (124, 4, 5, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (125, 4, 5, 4, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (126, 4, 5, 6, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (127, 4, 6, 7, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (128, 4, 7, 1, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (129, 4, 7, 3, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (130, 4, 7, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (131, 5, 0, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (132, 5, 0, 2, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (133, 5, 0, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (134, 5, 0, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (135, 5, 0, 8, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (136, 5, 1, 1, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (137, 5, 1, 3, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (138, 5, 1, 5, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (139, 5, 1, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (140, 5, 2, 0, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (141, 5, 2, 2, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (142, 5, 2, 4, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (143, 5, 2, 7, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (144, 5, 3, 1, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (145, 5, 3, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (146, 5, 4, 2, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (147, 5, 4, 4, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (148, 5, 4, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (149, 5, 5, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (150, 5, 5, 5, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (151, 5, 5, 7, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (152, 5, 6, 3, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (153, 5, 6, 6, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (154, 5, 6, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (155, 5, 7, 1, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (156, 5, 7, 5, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (157, 5, 7, 7, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (158, 5, 8, 0, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (159, 5, 8, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (160, 5, 8, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (161, 5, 8, 6, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (162, 5, 9, 1, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (163, 5, 9, 3, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (164, 5, 9, 5, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (165, 5, 9, 7, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (166, 5, 9, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (167, 6, 0, 1, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (168, 6, 0, 4, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (169, 6, 0, 7, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (170, 6, 0, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (171, 6, 1, 0, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (172, 6, 2, 1, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (173, 6, 2, 3, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (174, 6, 2, 5, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (175, 6, 2, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (176, 6, 3, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (177, 6, 3, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (178, 6, 3, 6, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (179, 6, 3, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (180, 6, 4, 1, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (181, 6, 4, 3, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (182, 6, 4, 5, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (183, 6, 4, 8, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (184, 6, 5, 2, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (185, 6, 5, 4, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (186, 6, 5, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (187, 6, 6, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (188, 6, 6, 6, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (189, 6, 6, 8, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (190, 6, 7, 1, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (191, 6, 7, 3, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (192, 6, 7, 5, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (193, 6, 7, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (194, 6, 8, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (195, 6, 8, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (196, 6, 9, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (197, 6, 9, 2, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (198, 6, 9, 5, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (199, 6, 9, 7, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (200, 6, 9, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (201, 7, 0, 1, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (202, 7, 0, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (203, 7, 0, 7, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (204, 7, 0, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (205, 7, 1, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (206, 7, 1, 3, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (207, 7, 1, 5, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (208, 7, 1, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (209, 7, 2, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (210, 7, 2, 7, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (211, 7, 2, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (212, 7, 3, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (213, 7, 3, 2, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (214, 7, 3, 5, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (215, 7, 3, 8, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (216, 7, 4, 1, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (217, 7, 4, 4, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (218, 7, 4, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (219, 7, 4, 9, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (220, 7, 5, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (221, 7, 5, 2, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (222, 7, 5, 5, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (223, 7, 5, 8, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (224, 7, 6, 1, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (225, 7, 6, 3, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (226, 7, 6, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (227, 7, 6, 9, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (228, 7, 7, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (229, 7, 7, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (230, 7, 7, 4, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (231, 7, 8, 1, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (232, 7, 8, 3, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (233, 7, 8, 5, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (234, 7, 8, 8, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (235, 7, 9, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (236, 7, 9, 2, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (237, 7, 9, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (238, 7, 9, 6, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (239, 7, 9, 9, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (240, 8, 0, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (241, 8, 0, 3, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (242, 8, 0, 5, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (243, 8, 0, 7, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (244, 8, 0, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (245, 8, 1, 1, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (246, 8, 1, 4, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (247, 8, 1, 6, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (248, 8, 1, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (249, 8, 2, 3, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (250, 8, 2, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (251, 8, 3, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (252, 8, 3, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (253, 8, 3, 4, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (254, 8, 3, 7, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (255, 8, 4, 1, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (256, 8, 4, 3, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (257, 8, 4, 6, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (258, 8, 4, 8, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (259, 8, 5, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (260, 8, 5, 2, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (261, 8, 5, 5, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (262, 8, 5, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (263, 8, 6, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (264, 8, 7, 3, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (265, 8, 7, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (266, 8, 7, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (267, 8, 8, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (268, 8, 8, 2, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (269, 8, 8, 5, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (270, 8, 8, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (271, 8, 9, 1, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (272, 8, 9, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (273, 8, 9, 7, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (274, 8, 9, 9, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (275, 9, 0, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (276, 9, 0, 2, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (277, 9, 0, 4, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (278, 9, 0, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (279, 9, 0, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (280, 9, 1, 1, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (281, 9, 1, 3, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (282, 9, 1, 9, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (283, 9, 2, 0, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (284, 9, 2, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (285, 9, 2, 4, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (286, 9, 2, 7, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (287, 9, 3, 6, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (288, 9, 3, 8, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (289, 9, 4, 1, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (290, 9, 4, 4, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (291, 9, 4, 7, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (292, 9, 4, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (293, 9, 5, 5, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (294, 9, 5, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (295, 9, 6, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (296, 9, 6, 2, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (297, 9, 6, 4, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (298, 9, 7, 5, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (299, 9, 7, 7, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (300, 9, 7, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (301, 9, 8, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (302, 9, 8, 2, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (303, 9, 8, 4, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (304, 9, 9, 1, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (305, 9, 9, 3, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (306, 9, 9, 5, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (307, 9, 9, 7, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (308, 9, 9, 9, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (309, 10, 0, 1, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (310, 10, 0, 3, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (311, 10, 0, 6, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (312, 10, 0, 9, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (313, 10, 1, 0, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (314, 10, 1, 7, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (315, 10, 2, 2, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (316, 10, 2, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (317, 10, 2, 6, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (318, 10, 3, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (319, 10, 3, 3, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (320, 10, 3, 7, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (321, 10, 3, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (322, 10, 4, 1, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (323, 10, 4, 4, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (324, 10, 4, 6, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (325, 10, 5, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (326, 10, 5, 7, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (327, 10, 5, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (328, 10, 6, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (329, 10, 6, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (330, 10, 6, 6, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (331, 10, 6, 8, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (332, 10, 7, 1, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (333, 10, 7, 3, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (334, 10, 7, 5, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (335, 10, 7, 7, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (336, 10, 7, 9, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (337, 10, 8, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (338, 10, 8, 2, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (339, 10, 8, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (340, 10, 8, 6, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (341, 10, 8, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (342, 10, 9, 1, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (343, 10, 9, 3, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (344, 10, 9, 5, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (345, 10, 9, 7, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (346, 10, 9, 9, 3); + +-- Insert map +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) +VALUES (1, 0, 10, 10, 1); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) +VALUES (2, 0, 7, 7, 1); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) +VALUES (3, 0, 8, 8, 1); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) +VALUES (4, 1, 8, 8, 1); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) +VALUES (5, 1, 10, 10, 1); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) +VALUES (6, 1, 10, 10, 1); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) +VALUES (7, 2, 10, 10, 1); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) +VALUES (8, 1, 10, 10, 1); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) +VALUES (9, 2, 10, 10, 1); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) +VALUES (10, 2, 10, 10, 1); + +-- Technique preview ile +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1000, 1000, 0, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1001, 1000, 2, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1002, 1000, 4, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1003, 1000, 3, 1, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1004, 1000, 5, 1, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1005, 1000, 0, 2, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1006, 1000, 2, 2, 7); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1007, 1000, 4, 2, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1008, 1000, 3, 3, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1009, 1000, 5, 3, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1010, 1000, 2, 4, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1011, 1000, 4, 4, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1012, 1000, 0, 5, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1013, 1000, 3, 5, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1014, 1000, 5, 5, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1015, 1001, 0, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1016, 1001, 3, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1017, 1001, 5, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1018, 1001, 2, 1, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1019, 1001, 1, 2, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1020, 1001, 3, 2, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1021, 1001, 5, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1022, 1001, 0, 3, - 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1023, 1001, 2, 3, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1024, 1001, 1, 4, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1025, 1001, 3, 4, - 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1026, 1001, 5, 4, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1027, 1001, 0, 5, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1028, 1001, 2, 5, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1029, 1001, 4, 5, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1030, 1002, 0, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1031, 1002, 2, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1032, 1002, 5, 0, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1033, 1002, 0, 2, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1034, 1002, 2, 2, 8); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1035, 1002, 4, 2, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1036, 1002, 1, 3, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1037, 1002, 3, 3, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1038, 1002, 5, 3, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1039, 1002, 0, 4, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1040, 1002, 2, 4, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1041, 1002, 4, 4, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1042, 1002, 1, 5, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1043, 1002, 3, 5, 6); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1044, 1002, 5, 5, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1045, 1003, 0, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1046, 1003, 2, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1047, 1003, 5, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1048, 1003, 3, 1, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1049, 1003, 0, 2, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1050, 1003, 2, 2, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1051, 1003, 4, 2, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1052, 1003, 3, 3, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1053, 1003, 5, 3, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1054, 1003, 0, 4, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1055, 1003, 2, 4, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1056, 1003, 4, 4, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1057, 1003, 1, 5, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1058, 1003, 3, 5, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1059, 1003, 5, 5, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1060, 1004, 0, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1061, 1004, 2, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1062, 1004, 4, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1063, 1004, 5, 1, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1064, 1004, 0, 2, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1065, 1004, 2, 2, 6); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1066, 1004, 4, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1067, 1004, 3, 3, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1068, 1004, 5, 3, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1069, 1004, 0, 4, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1070, 1004, 2, 4, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1071, 1004, 4, 4, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1072, 1004, 1, 5, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1073, 1004, 3, 5, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) +VALUES (1074, 1004, 5, 5, -99); + +-- Technique preview map +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `jouable`) +VALUES (1000, 0, 6, 6, 0); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `jouable`) +VALUES (1001, 0, 6, 6, 0); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `jouable`) +VALUES (1002, 0, 6, 6, 0); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `jouable`) +VALUES (1003, 0, 6, 6, 0); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `jouable`) +VALUES (1004, 0, 6, 6, 0); + +-- Technique demo historique +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) +VALUES (1712863723957, 1000, 0, 0, 0); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712863725524, 1000, 1001, 1006, 2, 1712863723957); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712863726236, 1000, 1005, 1006, 2, 1712863725524); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712863727008, 1000, 1006, 1007, 2, 1712863726236); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712863727722, 1000, 1006, 1010, 2, 1712863727008); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712863728353, 1000, 1005, 1012, 2, 1712863727722); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712863728926, 1000, 1012, 1013, 2, 1712863728353); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712863730214, 1000, 1008, 1009, 2, 1712863728926); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712863730839, 1000, 1004, 1009, 2, 1712863730214); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712863733130, 1000, 1009, 1014, 2, 1712863730839); +INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) +VALUES (1, 'Imparite', 1712863733130); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) +VALUES (1712864033490, 1001, 0, 0, 0); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712864036888, 1001, 1022, 1027, 2, 1712864033490); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712864038574, 1001, 1025, 1026, 2, 1712864036888); +INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) +VALUES (1, 'Isolement 1 2', 1712864038574); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) +VALUES (1712865036530, 1002, 0, 0, 0); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865039023, 1002, 1031, 1034, 2, 1712865036530); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865039197, 1002, 1031, 1034, 3, 1712865039023); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865040071, 1002, 1033, 1034, 2, 1712865039197); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865040266, 1002, 1033, 1034, 3, 1712865040071); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865041002, 1002, 1034, 1035, 2, 1712865040266); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865041194, 1002, 1034, 1035, 3, 1712865041002); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865045033, 1002, 1034, 1040, 2, 1712865041194); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865045217, 1002, 1034, 1040, 3, 1712865045033); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865045918, 1002, 1031, 1032, 2, 1712865045217); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865046081, 1002, 1031, 1032, 3, 1712865045918); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865046804, 1002, 1032, 1038, 2, 1712865046081); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865046978, 1002, 1032, 1038, 3, 1712865046804); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865048456, 1002, 1037, 1043, 2, 1712865046978); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865048639, 1002, 1037, 1043, 3, 1712865048456); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865049205, 1002, 1042, 1043, 2, 1712865048639); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865049366, 1002, 1042, 1043, 3, 1712865049205); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865050144, 1002, 1043, 1044, 2, 1712865049366); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865050344, 1002, 1043, 1044, 3, 1712865050144); +INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) +VALUES (1, 'Parite', 1712865050344); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) +VALUES (1712865270460, 1003, 0, 0, 0); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865271875, 1003, 1054, 1055, 2, 1712865270460); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865272281, 1003, 1050, 1055, 2, 1712865271875); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865272438, 1003, 1050, 1055, 3, 1712865272281); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865272868, 1003, 1055, 1056, 2, 1712865272438); +INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) +VALUES (1, 'Unite 4', 1712865272868); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) +VALUES (1712865496821, 1004, 0, 0, 0); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865497747, 1004, 1061, 1065, 2, 1712865496821); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865498240, 1004, 1064, 1065, 2, 1712865497747); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712865498683, 1004, 1065, 1070, 2, 1712865498240); +INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) +VALUES (1, 'Unite 6', 1712865498683); + +-- Solution +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) +VALUES (1712872020552, 1, 0, 0, 0); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872024008, 1, 38, 39, 2, 1712872020552); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872024154, 1, 38, 39, 3, 1712872024008); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872024895, 1, 37, 38, 2, 1712872024154); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872025605, 1, 36, 37, 2, 1712872024895); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872026479, 1, 35, 36, 2, 1712872025605); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872026643, 1, 35, 36, 3, 1712872026479); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872027541, 1, 35, 45, 2, 1712872026643); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872028434, 1, 45, 54, 2, 1712872027541); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872029052, 1, 54, 61, 2, 1712872028434); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872029202, 1, 54, 61, 3, 1712872029052); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872030341, 1, 61, 62, 2, 1712872029202); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872031841, 1, 62, 63, 2, 1712872030341); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872033353, 1, 63, 64, 2, 1712872031841); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872034729, 1, 55, 64, 2, 1712872033353); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872034896, 1, 55, 64, 3, 1712872034729); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872035360, 1, 47, 55, 2, 1712872034896); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872036918, 1, 46, 47, 2, 1712872035360); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872039355, 1, 65, 66, 2, 1712872036918); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872039896, 1, 66, 67, 2, 1712872039355); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872040365, 1, 67, 68, 2, 1712872039896); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872041491, 1, 60, 68, 2, 1712872040365); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872042001, 1, 50, 60, 2, 1712872041491); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872043091, 1, 44, 50, 2, 1712872042001); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872043278, 1, 44, 50, 3, 1712872043091); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872044449, 1, 43, 44, 2, 1712872043278); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872044603, 1, 43, 44, 3, 1712872044449); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872047056, 1, 42, 43, 2, 1712872044603); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872047221, 1, 42, 43, 3, 1712872047056); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872050268, 1, 41, 42, 2, 1712872047221); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872051991, 1, 40, 41, 2, 1712872050268); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872053377, 1, 40, 48, 2, 1712872051991); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872055342, 1, 48, 49, 2, 1712872053377); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872055557, 1, 48, 49, 3, 1712872055342); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872056468, 1, 41, 49, 2, 1712872055557); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872056635, 1, 41, 49, 3, 1712872056468); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872058669, 1, 48, 56, 2, 1712872056635); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872058833, 1, 48, 56, 3, 1712872058669); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872060600, 1, 56, 57, 2, 1712872058833); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872060769, 1, 56, 57, 3, 1712872060600); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872063080, 1, 57, 58, 2, 1712872060769); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872063239, 1, 57, 58, 3, 1712872063080); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872063860, 1, 57, 62, 2, 1712872063239); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872064018, 1, 57, 62, 3, 1712872063860); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872064830, 1, 58, 63, 2, 1712872064018); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872064982, 1, 58, 63, 3, 1712872064830); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872066348, 1, 52, 58, 2, 1712872064982); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872066506, 1, 52, 58, 3, 1712872066348); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872067506, 1, 51, 52, 2, 1712872066506); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872068658, 1, 42, 52, 2, 1712872067506); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872068795, 1, 42, 52, 3, 1712872068658); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872070209, 1, 52, 53, 2, 1712872068795); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872070354, 1, 52, 53, 3, 1712872070209); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872071561, 1, 53, 59, 2, 1712872070354); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712872071714, 1, 53, 59, 3, 1712872071561); +INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) +VALUES (1, 'Solution 1', 1712872071714); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) +VALUES (1712880118671, 2, 0, 0, 0); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880120321, 2, 69, 70, 2, 1712880118671); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880121149, 2, 70, 71, 2, 1712880120321); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880121317, 2, 70, 71, 3, 1712880121149); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880122130, 2, 71, 75, 2, 1712880121317); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880122296, 2, 71, 75, 3, 1712880122130); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880123098, 2, 75, 84, 2, 1712880122296); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880123873, 2, 83, 84, 2, 1712880123098); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880124666, 2, 82, 83, 2, 1712880123873); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880125373, 2, 81, 82, 2, 1712880124666); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880125567, 2, 81, 82, 3, 1712880125373); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880126405, 2, 76, 81, 2, 1712880125567); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880126577, 2, 76, 81, 3, 1712880126405); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880127336, 2, 72, 76, 2, 1712880126577); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880127530, 2, 72, 76, 3, 1712880127336); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880128206, 2, 72, 73, 2, 1712880127530); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880128436, 2, 72, 73, 3, 1712880128206); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880131844, 2, 73, 74, 2, 1712880128436); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880132629, 2, 74, 80, 2, 1712880131844); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880132796, 2, 74, 80, 3, 1712880132629); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880134069, 2, 79, 80, 2, 1712880132796); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880134953, 2, 77, 82, 2, 1712880134069); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880135736, 2, 73, 77, 2, 1712880134953); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880136644, 2, 76, 77, 2, 1712880135736); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880137782, 2, 77, 78, 2, 1712880136644); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) +VALUES (1712880137964, 2, 77, 78, 3, 1712880137782); +INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) +VALUES (1, 'Solution 2', 1712880137964); \ No newline at end of file From ea6008d0729be07cc804e87c61b9fb3d1dfd6a3c Mon Sep 17 00:00:00 2001 From: Antoine Date: Fri, 12 Apr 2024 12:59:38 +0200 Subject: [PATCH 08/31] =?UTF-8?q?Refactoring=20et=20impl=C3=A9mentation=20?= =?UTF-8?q?des=20m=C3=A9thode=20equals?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/hashimiste/impl/jeu/CaseVideImpl.java | 9 +++++ .../java/fr/hashimiste/impl/jeu/IleImpl.java | 34 +++++++++------- .../java/fr/hashimiste/impl/jeu/PontImpl.java | 39 ++++++++++++++++++- 3 files changed, 66 insertions(+), 16 deletions(-) diff --git a/src/main/java/fr/hashimiste/impl/jeu/CaseVideImpl.java b/src/main/java/fr/hashimiste/impl/jeu/CaseVideImpl.java index 3ff2a0d..6e1e6fb 100644 --- a/src/main/java/fr/hashimiste/impl/jeu/CaseVideImpl.java +++ b/src/main/java/fr/hashimiste/impl/jeu/CaseVideImpl.java @@ -75,4 +75,13 @@ public int opParcours(Direction d) { } return (getVoisinCase(d).opParcours(d)); } + + @Override + public boolean equals(Object obj) { + if (obj instanceof CaseVide) { + CaseVide c = (CaseVide) obj; + return c.getX() == this.x && c.getY() == this.y && c.getGrille().getId() == this.grille.getId(); + } + return false; + } } diff --git a/src/main/java/fr/hashimiste/impl/jeu/IleImpl.java b/src/main/java/fr/hashimiste/impl/jeu/IleImpl.java index 6043b4c..ed631db 100644 --- a/src/main/java/fr/hashimiste/impl/jeu/IleImpl.java +++ b/src/main/java/fr/hashimiste/impl/jeu/IleImpl.java @@ -61,7 +61,8 @@ public int getY() { @Override public boolean isComplete() { - return getNbPont() == this.n; + int nbPont = getNbPont(); + return nbPont == this.n; } @Override @@ -116,7 +117,8 @@ public int getNbPont() { int nbTotal = 0; for (Direction value : Direction.values()) { - nbTotal += getVoisinCase(value) instanceof PontImpl ? ((PontImpl) getVoisinCase(value)).getN() : 0; + Case voisinCase = getVoisinCase(value); + nbTotal += voisinCase instanceof PontImpl && ((PontImpl) voisinCase).estConnecte(this) ? ((PontImpl) voisinCase).getN() : 0; } return nbTotal; @@ -169,25 +171,18 @@ public Grille getGrille() { @Override public Case getVoisinCase(Direction d) { - Case c = null; switch (d) { case NORD: - if (x < 1) return null; - c = (grille.getIle(x - 1, y)); - break; + return x < 1 ? null : grille.getIle(x - 1, y); case EST: - if (y > grille.getDimension().getWidth() - 2) return null; - c = (grille.getIle(x, y + 1)); - break; + return y > grille.getDimension().getWidth() - 2 ? null : grille.getIle(x, y + 1); case SUD: - if (x > grille.getDimension().getHeight() - 2) return null; - c = (grille.getIle(x + 1, y)); - break; + return x > grille.getDimension().getHeight() - 2 ? null : grille.getIle(x + 1, y); case OUEST: - if (y < 1) return null; - c = (grille.getIle(x, y - 1)); + return y < 1 ? null : grille.getIle(x, y - 1); + default: + return null; } - return c; } @Override @@ -213,6 +208,15 @@ public String toString() { '}'; } + @Override + public boolean equals(Object obj) { + if (obj instanceof Ile) { + Ile ile = (Ile) obj; + return ile.getX() == this.x && ile.getY() == this.y && ile.getN() == this.n && ile.getGrille().getId() == this.grille.getId(); + } + return false; + } + @Override public int getId() { return id; diff --git a/src/main/java/fr/hashimiste/impl/jeu/PontImpl.java b/src/main/java/fr/hashimiste/impl/jeu/PontImpl.java index 59799c9..615ad77 100644 --- a/src/main/java/fr/hashimiste/impl/jeu/PontImpl.java +++ b/src/main/java/fr/hashimiste/impl/jeu/PontImpl.java @@ -9,13 +9,17 @@ public class PontImpl implements Pont { private final int n; private final Grille grille; private final Direction direction; + private final Ile ile1; + private final Ile ile2; - public PontImpl(int x, int y, int n, Grille g, Direction d) { + public PontImpl(int x, int y, int n, Grille g, Direction d, Ile ile1, Ile ile2) { this.x = x; this.y = y; this.n = n; this.grille = g; this.direction = d; + this.ile1 = ile1; + this.ile2 = ile2; } @Override @@ -77,4 +81,37 @@ public int getN() { public Direction getDirection() { return this.direction; } + + public Ile getIle1() { + return ile1; + } + + public Ile getIle2() { + return ile2; + } + + public boolean estConnecte(Ile ile) { + return ile.equals(ile1) || ile.equals(ile2); + } + + @Override + public boolean equals(Object obj) { + if (obj instanceof Pont) { + PontImpl p = (PontImpl) obj; + return p.getX() == x && p.getY() == y && p.getN() == n && p.getGrille().getId() == grille.getId() + && ile1.equals(p.getIle1()) && ile2.equals(p.getIle2()); + } + return false; + } + + @Override + public String toString() { + return "PontImpl{" + + "x=" + x + + ", y=" + y + + ", n=" + n + + ", id(grille)=" + grille.getId() + + ", direction=" + direction + + '}'; + } } From bbccc0e5bd212abc2c613193abbc48b44b0bba19 Mon Sep 17 00:00:00 2001 From: Antoine Date: Fri, 12 Apr 2024 13:01:14 +0200 Subject: [PATCH 09/31] =?UTF-8?q?Supression=20de=20l'attrbitue=20hor=20dan?= =?UTF-8?q?s=20Bridge=20et=20v=C3=A9rrification=20grille=20null?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/gui/component/GameComponent.java | 125 +++++++++++++----- 1 file changed, 90 insertions(+), 35 deletions(-) diff --git a/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java b/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java index 12eaebd..8503482 100644 --- a/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java +++ b/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java @@ -1,10 +1,7 @@ package fr.hashimiste.impl.gui.component; -import fr.hashimiste.core.jeu.Case; -import fr.hashimiste.core.jeu.Direction; -import fr.hashimiste.core.jeu.Grille; +import fr.hashimiste.core.jeu.*; import fr.hashimiste.core.jeu.Historique.Action; -import fr.hashimiste.core.jeu.Ile; import fr.hashimiste.impl.gui.theme.DefaultTheme; import fr.hashimiste.impl.jeu.GrilleImpl; @@ -14,6 +11,7 @@ import java.awt.event.MouseMotionListener; import java.awt.geom.Line2D; import java.util.ArrayList; +import java.util.Comparator; import java.util.List; /** @@ -53,6 +51,7 @@ public GameComponent(Grille grille) { @Override protected void paintComponent(Graphics g) { super.paintComponent(g); + if (getGrille() == null) return; double factor = Math.min((getSize().getWidth() - 5) / getGrille().getDimension().width, (getSize().getHeight() - 5) / getGrille().getDimension().height); //System.out.println("factor: " + factor); @@ -71,7 +70,7 @@ protected void paintComponent(Graphics g) { // Dessiner les ponts potentiels for (Bridge bridge : potentialsBridges) { g2.setColor(DefaultTheme.INSTANCE.getPotentialBridgeColor()); - if (bridge.hor) { + if (estHorizontal(bridge)) { g2.draw(new Line2D.Float(zeroX + cell_size * bridge.ile1.getX() + cell_size + bridgeSpacing, zeroY + cell_size * bridge.ile1.getY() + cell_size / 2, zeroX + cell_size * bridge.ile2.getX() - bridgeSpacing, zeroY + cell_size * bridge.ile1.getY() + cell_size / 2)); } else { @@ -86,8 +85,8 @@ protected void paintComponent(Graphics g) { // Dessiner les ponts réels for (Bridge bridge : bridges) { g2.setColor(Color.BLACK); - if (bridge.duo) { // si pont double - if (bridge.hor) { + if (bridge.n == 2) { // si pont double + if (estHorizontal(bridge)) { g2.draw(new Line2D.Float(zeroX + cell_size * bridge.ile1.getX() + cell_size, zeroY + cell_size * bridge.ile1.getY() + cell_size / 2 - bridgeSpacing, zeroX + cell_size * bridge.ile2.getX(), zeroY + cell_size * bridge.ile1.getY() + cell_size / 2 - bridgeSpacing)); g2.draw(new Line2D.Float(zeroX + cell_size * bridge.ile1.getX() + cell_size, zeroY + cell_size * bridge.ile1.getY() + cell_size / 2 + bridgeSpacing, @@ -99,7 +98,7 @@ protected void paintComponent(Graphics g) { zeroX + cell_size * bridge.ile2.getX() + cell_size / 2 + bridgeSpacing, zeroY + cell_size * bridge.ile2.getY())); } } else { // sinon si pont simple - if (bridge.hor) { + if (estHorizontal(bridge)) { g2.draw(new Line2D.Float(zeroX + cell_size * bridge.ile1.getX() + cell_size, zeroY + cell_size * bridge.ile1.getY() + cell_size / 2, zeroX + cell_size * bridge.ile2.getX(), zeroY + cell_size * bridge.ile1.getY() + cell_size / 2)); } else { @@ -117,7 +116,6 @@ protected void paintComponent(Graphics g) { */ @Override public void mouseMoved(MouseEvent e) { - refreshBridge(e.getX(), e.getY()); } @@ -148,11 +146,11 @@ public void refreshBridge(int souris_x, int souris_y) { if (!isOnIsle) { if (ileOuest != null && ileEst != null) { - potentialsBridges.add(new Bridge(ileOuest, ileEst, true)); + potentialsBridges.add(new Bridge(ileOuest, ileEst, -1)); } if (ileNord != null && ileSud != null) { - potentialsBridges.add(new Bridge(ileNord, ileSud, false)); + potentialsBridges.add(new Bridge(ileNord, ileSud, -1)); } if (potentialsBridges.size() >= 2) { int t = getNearestBridge(souris_x, souris_y); @@ -162,22 +160,22 @@ public void refreshBridge(int souris_x, int souris_y) { } } else { for (Bridge bridge : bridges) { - if ((bridge.ile1 == ile || bridge.ile2 == ile) && !bridge.duo) { + if ((bridge.ile1 == ile || bridge.ile2 == ile) && bridge.n != 2) { potentialsBridges.add(bridge); break; } } if (ileOuest != null) { - potentialsBridges.add(new Bridge(ileOuest, ile, true)); + potentialsBridges.add(new Bridge(ileOuest, ile, -1)); } if (ileEst != null) { - potentialsBridges.add(new Bridge(ile, ileEst, true)); + potentialsBridges.add(new Bridge(ile, ileEst, -1)); } if (ileSud != null) { - potentialsBridges.add(new Bridge(ile, ileSud, false)); + potentialsBridges.add(new Bridge(ile, ileSud, -1)); } if (ileNord != null) { - potentialsBridges.add(new Bridge(ileNord, ile, false)); + potentialsBridges.add(new Bridge(ileNord, ile, -1)); } } } @@ -295,7 +293,6 @@ public void mousePressed(MouseEvent e) { Bridge selectedBridge = potentialsBridges.get(getNearestBridge(e.getX(), e.getY())); int index = BridgeAlreadyExists(selectedBridge); - System.out.println("index: " + index); if (index < 0) { // Ajouter le pont à la liste des ponts boolean pose = true; @@ -308,21 +305,22 @@ public void mousePressed(MouseEvent e) { if (pose) { bridges.add(selectedBridge); ((GrilleImpl) getGrille()).poserPont(selectedBridge.ile1, selectedBridge.ile2, 1); - onNewBridge(selectedBridge.ile1, selectedBridge.ile2, Action.UN_PONT); + onNewAction(selectedBridge.ile1, selectedBridge.ile2, Action.UN_PONT); } } else { Bridge currentBridge = bridges.get(index); // Le pont est déjà dans la liste, le rendre double ou le supprimer - if (currentBridge.duo) { + if (currentBridge.n == 2) { // Supprimer le pont - onNewBridge(selectedBridge.ile1, selectedBridge.ile2, Action.AUCUN_PONT); + onNewAction(selectedBridge.ile1, selectedBridge.ile2, Action.AUCUN_PONT); + ((GrilleImpl) getGrille()).supprimerPont(selectedBridge.ile1, selectedBridge.ile2); bridges.remove(index); } else { // Rendre le pont double - currentBridge.duo = true; - onNewBridge(selectedBridge.ile1, selectedBridge.ile2, Action.DEUX_PONTS); -// ((GrilleImpl) getGrille()).poserPont(selectedBridge.ile1, selectedBridge.ile2, 2); + currentBridge.n = 2; + onNewAction(selectedBridge.ile1, selectedBridge.ile2, Action.DEUX_PONTS); + ((GrilleImpl) getGrille()).poserPont(selectedBridge.ile1, selectedBridge.ile2, 2); } } @@ -335,7 +333,7 @@ public void mousePressed(MouseEvent e) { } } - public abstract void onNewBridge(Ile ile1, Ile ile2, Action action); + public abstract void onNewAction(Ile ile1, Ile ile2, Action action); /** * methode qui retourne si le pont passer en paramètre existe déjà et retourne sont index ou -1 sinon @@ -357,12 +355,27 @@ private int BridgeAlreadyExists(Bridge bridge) { /** * Fonction retournant si 2 ponts se croisent * - * @param bridge1 - * @param bridge2 - * @return boolean + * @param bridge1 premier pont + * @param bridge2 deuxième pont + * @return boolean si les ponts se croisent */ private boolean isCrossing(Bridge bridge1, Bridge bridge2) { - if (bridge1.hor && !bridge2.hor) { + return isCrossing(bridge1, bridge2, 2); + } + + /** + * Fonction retournant si 2 ponts se croisent + * + * @param bridge1 premier pont + * @param bridge2 deuxième pont + * @param recursion nombre de récursion restant + * @return boolean si les ponts se croisent + */ + private boolean isCrossing(Bridge bridge1, Bridge bridge2, int recursion) { + if (recursion == 0) { + return false; + } + if (estHorizontal(bridge1) && !estHorizontal(bridge2)) { int y1 = bridge1.getIle1().getY(); int y2 = bridge1.getIle2().getY(); int y3 = bridge2.getIle1().getY(); @@ -375,8 +388,8 @@ private boolean isCrossing(Bridge bridge1, Bridge bridge2) { int x4 = bridge2.getIle2().getX(); return x1 <= x4 && x2 >= x3; } - } else if (!bridge1.hor && bridge2.hor) { - return isCrossing(bridge2, bridge1); + } else { + return isCrossing(bridge2, bridge1, recursion - 1); } return false; } @@ -396,6 +409,39 @@ public void mouseExited(MouseEvent e) { } + private boolean estHorizontal(Bridge bridge) { + return bridge.ile1.getY() == bridge.ile2.getY(); + } + + public void loadSave(Sauvegarde sauvegarde) { + bridges.clear(); + getGrille().chargerSauvegarde(sauvegarde); + if (sauvegarde == null) { + repaint(); + return; + } + Historique historique = sauvegarde.getReference(); + List historiques = new ArrayList<>(); + while (historique.getAction() != Action.NOUVELLE_GRILLE) { + historiques.add(historique); + historique = historique.getAvant(); + } + historiques.sort(Comparator.comparing(Historique::getTimestamp)); + for (Historique histo : historiques) { + if (histo.getAction() == Action.UN_PONT) { + bridges.add(new Bridge(histo.getIle1(), histo.getIle2(), 1)); + } else if (histo.getAction() == Action.DEUX_PONTS) { + bridges.stream() + .filter(b -> b.ile1 == histo.getIle1() && b.ile2 == histo.getIle2()) + .findFirst() + .ifPresent(b -> b.n = 2); + } else { + bridges.removeIf(b -> b.ile1 == histo.getIle1() && b.ile2 == histo.getIle2()); + } + } + repaint(); + } + /** * Cette classe représente des ponts * @@ -406,20 +452,20 @@ public class Bridge { Ile ile1; // première ile du pont Ile ile2; // deuxième ile du pont - boolean duo = false; // pont double - boolean hor; // disposition du pont true: horizontal & false: vertical + //boolean duo = false; // pont double + int n; // disposition du pont true: horizontal & false: vertical /** * Constructeur d'un pont potentiel * * @param ile1 * @param ile2 - * @param hor + * @param n */ - public Bridge(Ile ile1, Ile ile2, boolean hor) { + public Bridge(Ile ile1, Ile ile2, int n) { this.ile1 = ile1; this.ile2 = ile2; - this.hor = hor; + this.n = n; } public Ile getIle1() { @@ -429,5 +475,14 @@ public Ile getIle1() { public Ile getIle2() { return ile2; } + + @Override + public String toString() { + return "Bridge{" + + "ile1=" + ile1 + + ", ile2=" + ile2 + + ", n=" + n + + '}'; + } } } From ae1a5bbdd584fc500da9d7e98baa23261cdd672a Mon Sep 17 00:00:00 2001 From: Antoine Date: Fri, 12 Apr 2024 13:01:35 +0200 Subject: [PATCH 10/31] =?UTF-8?q?Abilit=C3=A9=20de=20changement=20de=20gri?= =?UTF-8?q?lle=20dans=20la=20preview?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/gui/component/PreviewComponent.java | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/src/main/java/fr/hashimiste/impl/gui/component/PreviewComponent.java b/src/main/java/fr/hashimiste/impl/gui/component/PreviewComponent.java index 58745a0..812623e 100644 --- a/src/main/java/fr/hashimiste/impl/gui/component/PreviewComponent.java +++ b/src/main/java/fr/hashimiste/impl/gui/component/PreviewComponent.java @@ -1,5 +1,6 @@ package fr.hashimiste.impl.gui.component; +import fr.hashimiste.core.image.AppImage; import fr.hashimiste.core.jeu.Case; import fr.hashimiste.core.jeu.Grille; import fr.hashimiste.core.jeu.Ile; @@ -7,13 +8,14 @@ import javax.swing.*; import java.awt.*; import java.awt.geom.Rectangle2D; +import java.awt.image.BufferedImage; /** * Cette classe représente un composant de prévisualisation de la grille du jeu. * Elle hérite de JComponent et affiche une représentation graphique de la grille. */ public class PreviewComponent extends JComponent { - private final transient Grille grille; + private transient Grille grille; /** * Constructeur de la classe PreviewComponent. @@ -24,6 +26,11 @@ public PreviewComponent(Grille grille) { this.grille = grille; } + public void setGrille(Grille grille) { + this.grille = grille; + repaint(); + } + /** * Cette méthode est utilisée pour dessiner le composant de prévisualisation. * Elle dessine une représentation graphique de la grille. @@ -34,6 +41,13 @@ public PreviewComponent(Grille grille) { protected void paintComponent(Graphics g) { super.paintComponent(g); if (grille == null) { + BufferedImage logo = AppImage.INSTANCE.getLogo(true); + double factor = Math.min((getSize().getWidth() - 5) / logo.getWidth(), (getSize().getHeight() - 5) / logo.getHeight()); + int zeroX = (int) ((getSize().width / 2d) - ((logo.getWidth() * factor) / 2)); + int zeroY = (int) ((getSize().height / 2d) - ((logo.getHeight() * factor) / 2)); + g.drawImage(logo, zeroX, zeroY, (int) (logo.getWidth() * factor), (int) (logo.getHeight() * factor), null); + return; + } else if (grille.getDimension().width == 0 || grille.getDimension().height == 0) { return; } double factor = Math.min((getSize().getWidth() - 5) / grille.getDimension().width, (getSize().getHeight() - 5) / grille.getDimension().height); @@ -46,9 +60,15 @@ protected void paintComponent(Graphics g) { Ile ile = (Ile) c; g.setColor(Color.BLACK); g.drawOval((int) (zeroX + ile.getX() * factor), (int) (zeroY + ile.getY() * factor), (int) (factor), (int) (factor)); - g.setFont(font); - Rectangle2D d = g.getFontMetrics().getStringBounds(String.valueOf(ile.getN()), g); - g.drawString(String.valueOf(ile.getN()), (int) (zeroX + ile.getX() * factor + d.getCenterX()), (int) (zeroY + ile.getY() * factor + (d.getMaxY() * 3.5))); + if (ile.getN() >= -26) { + String n = String.valueOf(ile.getN()); + if (ile.getN() < 0) { + n = String.valueOf(Character.toChars('A' + -ile.getN() - 1)[0]); + } + g.setFont(font); + Rectangle2D d = g.getFontMetrics().getStringBounds(n, g); + g.drawString(n, (int) (zeroX + ile.getX() * factor + d.getCenterX()), (int) (zeroY + ile.getY() * factor + (d.getMaxY() * 3.5))); + } } } } From aeea74d03a411592c410bab74efebaa4ed38ee33 Mon Sep 17 00:00:00 2001 From: Antoine Date: Fri, 12 Apr 2024 13:02:15 +0200 Subject: [PATCH 11/31] =?UTF-8?q?Refactoring=20et=20v=C3=A9rification?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/fr/hashimiste/impl/gui/jeu/Jeu.java | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src/main/java/fr/hashimiste/impl/gui/jeu/Jeu.java b/src/main/java/fr/hashimiste/impl/gui/jeu/Jeu.java index 3c34493..e00e4c4 100644 --- a/src/main/java/fr/hashimiste/impl/gui/jeu/Jeu.java +++ b/src/main/java/fr/hashimiste/impl/gui/jeu/Jeu.java @@ -28,10 +28,15 @@ public class Jeu extends JFrameTemplateProfil implements Debuggable, MouseMotion private final JButton butMenu = creerBoutton("Menu", fenetreParente); private final JButton butVerifier = creerBoutton("Vérifier", this::verifier); private final JButton butAide = creerBoutton("Aide", this::aide); - private final List historiques = new ArrayList<>(); private final JButton butCharger = creerBoutton("Charger", this::charger); - private transient Historique precedent; private final JButton butSauvegarder = creerBoutton("Sauvegarder", this::sauvegarder); - private transient List sauvegardes; private final JButton butCheckpoint = creerBoutton("Checkpoint", this::checkpoint); + private final List historiques = new ArrayList<>(); + private final JButton butCharger = creerBoutton("Charger", this::charger); + private transient Historique precedent; + private final JButton butSauvegarder = creerBoutton("Sauvegarder", this::sauvegarder); + private transient List sauvegardes; + private final JButton butCheckpoint = creerBoutton("Checkpoint", this::checkpoint); + private final JButton butPrecedent = creerBoutton("Retour", this::precedent); private final transient GameComponent gameComponent; + /** * Constructeur de la classe Jeu. * @@ -42,7 +47,6 @@ public Jeu(JFrameTemplateProfil parent, Grille grille) { super(parent); this.grille = grille; - setLayout(new GridBagLayout()); GridBagConstraints constraints = new GridBagConstraints(); constraints.fill = GridBagConstraints.BOTH; @@ -50,7 +54,6 @@ public Jeu(JFrameTemplateProfil parent, Grille grille) { JPanel panelButtons = new JPanel(new FlowLayout(FlowLayout.LEFT)); - for (JButton button : new JButton[]{butMenu, butVerifier, butCharger, butSauvegarder, butCheckpoint, butPrecedent, butAide}) { panelButtons.add(button); } @@ -65,12 +68,13 @@ public Jeu(JFrameTemplateProfil parent, Grille grille) { // Add the PreviewComponent to the center of the game panel gameComponent = new GameComponent(grille) { @Override - public void onNewBridge(Ile ile1, Ile ile2, Action action) { + public void onNewAction(Ile ile1, Ile ile2, Action action) { precedent = precedent.creerSuivant(ile1, ile2, action); } }; game.add(gameComponent, BorderLayout.CENTER); + sauvegardes = grille.getSauvegardes(stockage); chargerHistorique(new Historique(grille, null, null, Historique.Action.NOUVELLE_GRILLE)); @@ -87,7 +91,11 @@ public void onNewBridge(Ile ile1, Ile ile2, Action action) { * Cette méthode est utilisée pour vérifier le jeu. */ private void verifier() { - // TODO + if (grille.verification()) { + JOptionPane.showMessageDialog(this, "Bravo, vous avez réussi !", "Bravo", JOptionPane.INFORMATION_MESSAGE); + } else { + JOptionPane.showMessageDialog(this, "Désolé, vous avez échoué !", "Désolé", JOptionPane.ERROR_MESSAGE); + } } /** @@ -104,7 +112,8 @@ private void charger() { if (nomSauvegarde != null) { Sauvegarde save = sauvegardes.stream().filter(s -> s.getNom().equals(nomSauvegarde)).findFirst().orElse(null); if (save != null) { -// grille.chargerSauvegarde(save); TODO +// grille.chargerSauvegarde(save); + gameComponent.loadSave(save); chargerHistorique(save.getReference()); } } @@ -168,7 +177,7 @@ private void precedent() { /** * Cette méthode est utilisée pour obtenir de l'aide dans le jeu. */ - private void aide() { //TODO comprendre pourquoi grille peut être nul sur certaines îles + private void aide() { JOptionPane.showMessageDialog(this, grille.aide().getDroite(), "Aide", JOptionPane.INFORMATION_MESSAGE); } @@ -192,7 +201,7 @@ public String getDebugInfo() { sb.append(h).append("\n"); } return sb.toString(); - } private final JButton butPrecedent = creerBoutton("Retour", this::precedent); + } @Override public void mouseDragged(MouseEvent e) { @@ -205,11 +214,4 @@ public void mouseMoved(MouseEvent e) { } - - - - - - - } From 495e26eaa2f299d897d17154cf3f28b1d2321c32 Mon Sep 17 00:00:00 2001 From: Antoine Date: Fri, 12 Apr 2024 13:02:41 +0200 Subject: [PATCH 12/31] Affichage demo --- .../fr/hashimiste/core/jeu/Technique.java | 72 ++++++++++++------- .../hashimiste/impl/gui/menu/Technique.java | 32 +++++++-- 2 files changed, 75 insertions(+), 29 deletions(-) diff --git a/src/main/java/fr/hashimiste/core/jeu/Technique.java b/src/main/java/fr/hashimiste/core/jeu/Technique.java index 7a2e511..8e1e705 100644 --- a/src/main/java/fr/hashimiste/core/jeu/Technique.java +++ b/src/main/java/fr/hashimiste/core/jeu/Technique.java @@ -24,8 +24,8 @@ public enum Technique { n == 6 && (x == 0 || y == 0 || x == l - 1 || y == c - 1)) || (n == 4 && ((x == 0 && (y == 0 || y == c - 1)) || (x == l - 1 && (y == 0 || y == c - 1))) ); - }, - "../../../../../resources/images/logo_atlas.png"), + } + ), /** * Technique vérifiant si une île est un 4 avec deux voisin, un 6 avec trois voisins, ou un 8. */ @@ -36,7 +36,7 @@ public enum Technique { int nbV = o.getNbVoisin(); //fonction qui calcule le nombre de voisin possible d'une île return (n == 8) || (n == 6 && nbV == 3) || (n == 4 && nbV == 2); }, - "../../../../../resources/images/technique_parite.png"), + 1002, 1712865050344L), /** * Technique vérifiant si une île est un 3 avec deux voisins, un 5 avec trois voisins, ou un 7. * Vérifie aussi si elle a au moins un pont avec chacun de ses voisins. @@ -70,7 +70,7 @@ public enum Technique { } return verif; }, - "../../../../../resources/images/technique_imparite.png"), + 1000, 1712863733130L), /** * Technique vérifiant si une île est un 3 avec deux voisins, un 5 avec trois voisins, ou un 7. * Vérifie en plus si l'un de ses voisins est un 1. @@ -85,8 +85,8 @@ public enum Technique { int nbV = o.getNbVoisin(); int nbV1 = o.getNbVoisinFiltre(i -> i.getN() == 1); return (n == 7 && nbV1 == 1) || (n == 5 && nbV == 3 && nbV1 == 1) || (n == 3 && nbV == 2 && nbV1 == 1); - }, - "../../../../../resources/images/logo_atlas.png"), + } + ), /** * Technique vérifiant si une île est un 1 ou un 2 avec un seul voisin. */ @@ -98,8 +98,8 @@ public enum Technique { int n = o.getN(); int nbV = o.getNbVoisin(); return (n == 1 || n == 2) && nbV == 1; - }, - "../../../../../resources/images/logo_atlas.png"), + } + ), /** * Technique vérifiant si une île est un 4 avec trois voisins dont deux d'entres eux sont des 1, * ou un 5 avec quatre voisins dont trois d'entre eux sont des 1. @@ -110,7 +110,7 @@ public enum Technique { "Même chose si une île est de valeur 5, avec trois voisins de valeur 1.", o -> (o.getN() == 4 && o.getNbVoisin() == 3 && o.getNbVoisinFiltre(i -> i.getN() == 1) == 2) || (o.getN() == 5 && o.getNbVoisin() == 4 && o.getNbVoisinFiltre(i -> i.getN() == 1) == 3), - "../../../../../resources/images/technique_unite_4.png"), + 1003, 1712865272868L), /** * Technique vérifiant si une île est un 6 avec un 1 pour voisin, et si elle n'a pas de ponts avec ses voisins qui ne sont pas des 1. */ @@ -127,7 +127,7 @@ public enum Technique { } return verif; }, - "../../../../../resources/images/technique_unite_6.png"), + 1004, 1712865498683L), /** * Technique vérifiant si une île a autant de ponts possible que sa valeur. */ @@ -138,8 +138,8 @@ public enum Technique { int n = o.getN(); int nbPoss = o.getNbPontPossible(); return n == nbPoss; - }, - "../../../../../resources/images/logo_atlas.png"), + } + ), /** * Technique vérifiant si une île est un 1 possédant uniquement un voisin qui n'est pas non plus un 1. */ @@ -147,7 +147,7 @@ public enum Technique { "Si une île de valeur 1 est voisin avec un 1, il ne peut pas y avoir de pont " + "entre eux, car cela brise la règle d'isolation.", o -> o.getN() == 1 && (o.getNbVoisin() - o.getNbVoisinFiltre(i -> i.getN() == 1) == 1), - "../../../../../resources/images/technique_isolement_1_2.png"), + 1001, 1712864038574L), /** * Technique vérifiant si une île est un 2 possédant deux voisin dont l'un est aussi un 2 * et dont l'autre n'est relié par aucun pont. @@ -167,12 +167,24 @@ public enum Technique { } return (verifVoisin2 && verifPont0); }, - "../../../../../resources/images/technique_isolement_1_2.png"); + 1001, 1712864038574L); private final String nom; private final String description; private final Predicate predicate; - private final String url; + private final int grilleId; + private final long sauvegardeTimestamp; + + /** + * Constructeur de Technique. + * + * @param nom le nom de la technique. + * @param description la description de la technique. + * @param predicate le prédicat pour tester une condition spécifique sur une île. + */ + Technique(String nom, String description, Predicate predicate) { + this(nom, description, predicate, 0); + } /** * Constructeur de Technique. @@ -180,12 +192,25 @@ public enum Technique { * @param nom le nom de la technique. * @param description la description de la technique. * @param predicate le prédicat pour tester une condition spécifique sur une île. + * @param grilleId */ - Technique(String nom, String description, Predicate predicate, String url) { + Technique(String nom, String description, Predicate predicate, int grilleId) { + this(nom, description, predicate, grilleId, 0L); + } + + /** + * Constructeur de Technique. + * + * @param nom le nom de la technique. + * @param description la description de la technique. + * @param predicate le prédicat pour tester une condition spécifique sur une île. + */ + Technique(String nom, String description, Predicate predicate, int grilleId, long sauvegardeTimestamp) { this.nom = nom; this.description = description; this.predicate = predicate; - this.url = url; + this.grilleId = grilleId; + this.sauvegardeTimestamp = sauvegardeTimestamp; } /** @@ -216,12 +241,11 @@ public boolean test(Ile ile) { return this.predicate.test(ile); } - /** - * Récupère l'url de l'image montrant un exemple de cette technique - * - * @return l'url de l'image - */ - public String getUrl() { - return this.url; + public int getGrilleId() { + return grilleId; + } + + public long getSauvegardeTimestamp() { + return sauvegardeTimestamp; } } diff --git a/src/main/java/fr/hashimiste/impl/gui/menu/Technique.java b/src/main/java/fr/hashimiste/impl/gui/menu/Technique.java index 2c4ece2..0852d2d 100644 --- a/src/main/java/fr/hashimiste/impl/gui/menu/Technique.java +++ b/src/main/java/fr/hashimiste/impl/gui/menu/Technique.java @@ -1,6 +1,11 @@ package fr.hashimiste.impl.gui.menu; import fr.hashimiste.core.gui.JFrameTemplateProfil; +import fr.hashimiste.core.jeu.Grille; +import fr.hashimiste.core.jeu.Historique; +import fr.hashimiste.core.jeu.Ile; +import fr.hashimiste.impl.data.sql.filter.EqFilter; +import fr.hashimiste.impl.gui.component.GameComponent; import javax.swing.*; import java.awt.*; @@ -19,7 +24,12 @@ public class Technique extends JFrameTemplateProfil { private final JList list = new JList<>(listModel); private final JScrollPane scroll = new JScrollPane(list); private final JTextArea description = new JTextArea(); - private final JLabel exemple_image = new JLabel(); + private final GameComponent demo = new GameComponent(null) { + @Override + public void onNewAction(Ile ile1, Ile ile2, Historique.Action action) { + // Ne rien faire + } + }; /** * Constructeur de la classe Technique. @@ -45,17 +55,29 @@ public Technique(JFrameTemplateProfil parent) { if (!e.getValueIsAdjusting()) { fr.hashimiste.core.jeu.Technique technique = fr.hashimiste.core.jeu.Technique.values()[list.getSelectedIndex()]; description.setText(technique.getDescription()); - /*TODO L'image ne s'affiche pas jsp pourquoi */ - //exemple_image.setIcon(new ImageIcon(technique.getUrl())); + Grille grille = stockage.charger(Grille.class, new EqFilter("id_map", technique.getGrilleId())).stream().findFirst().orElse(null); + demo.setGrille(grille); + if (grille != null) { + demo.loadSave(grille.getSauvegardes(stockage) + .stream() + .filter(s -> s.getSauvegardeTimestamp().getTime() == technique.getSauvegardeTimestamp() + && s.getProfil().getId() == 1) + .findFirst().orElse(null) + ); + } } }); description.setLineWrap(true); description.setWrapStyleWord(true); description.setEditable(false); + JPanel panel = new JPanel(); + panel.setLayout(new GridLayout(0, 1)); + panel.add(description); + panel.add(demo); + add(haut, BorderLayout.NORTH); add(scroll, BorderLayout.WEST); - add(description, BorderLayout.CENTER); - //add(exemple_image, BorderLayout.SOUTH); + add(panel, BorderLayout.CENTER); } } From a49a585b64412ca3acfc2e3ee3da315d219cfed1 Mon Sep 17 00:00:00 2001 From: Antoine Date: Fri, 12 Apr 2024 13:03:31 +0200 Subject: [PATCH 13/31] Ajout dynamique au mode aventure --- .../fr/hashimiste/impl/gui/menu/Aventure.java | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/main/java/fr/hashimiste/impl/gui/menu/Aventure.java b/src/main/java/fr/hashimiste/impl/gui/menu/Aventure.java index db73355..f5b976c 100644 --- a/src/main/java/fr/hashimiste/impl/gui/menu/Aventure.java +++ b/src/main/java/fr/hashimiste/impl/gui/menu/Aventure.java @@ -25,18 +25,7 @@ public class Aventure extends JFrameTemplateProfil { private final transient List grilles = stockage.charger(Grille.class, new EqFilter("aventure", 1)); // Niveau as affiché avec la classe fr.hashimiste.impl.gui.jeu.Jeu [new Jeu(this, laGrille)] - private final JFrame[] niveaux = new JFrame[]{ - new Jeu(this, grilles.get(1)), - new Jeu(this, grilles.get(2)), - new Jeu(this, grilles.get(3)), - new Jeu(this, grilles.get(0)), - new Jeu(this, grilles.get(4)), - new Jeu(this, grilles.get(5)), - new Jeu(this, grilles.get(6)), - new Jeu(this, grilles.get(7)), - new Jeu(this, grilles.get(8)), - new Jeu(this, grilles.get(9)) - }; + private final JFrame[] niveaux; /** * Constructeur de la classe Aventure. @@ -46,6 +35,11 @@ public class Aventure extends JFrameTemplateProfil { public Aventure(JFrameTemplateProfil parent) { super(parent); appliquerTheme(centre, bas, labAventure); + List mapAventures = stockage.charger(Grille.class, new EqFilter("aventure", 1)); + niveaux = new JFrame[mapAventures.size()]; + for (int i = 0; i < mapAventures.size(); i++) { + niveaux[i] = new Jeu(this, mapAventures.get(i)); + } labAventure.setAlignmentX(Component.CENTER_ALIGNMENT); labAventure.setFont(new Font("Arial", Font.BOLD, 30)); From 0cfb0c23637a7a2cf30f9f9a153314073d19570c Mon Sep 17 00:00:00 2001 From: Antoine Date: Fri, 12 Apr 2024 13:04:33 +0200 Subject: [PATCH 14/31] Refactoring est ajout de filtre grille non jouable --- .../hashimiste/impl/gui/menu/ModeLibre.java | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/main/java/fr/hashimiste/impl/gui/menu/ModeLibre.java b/src/main/java/fr/hashimiste/impl/gui/menu/ModeLibre.java index b8ae0eb..dabfe22 100644 --- a/src/main/java/fr/hashimiste/impl/gui/menu/ModeLibre.java +++ b/src/main/java/fr/hashimiste/impl/gui/menu/ModeLibre.java @@ -2,11 +2,11 @@ import fr.hashimiste.core.dev.Debuggable; import fr.hashimiste.core.gui.JFrameTemplateProfil; -import fr.hashimiste.core.image.AppImage; import fr.hashimiste.core.jeu.Difficulte; import fr.hashimiste.core.jeu.Grille; import fr.hashimiste.core.joueur.StatistiqueKey; import fr.hashimiste.core.utils.SizeComponentAdapter; +import fr.hashimiste.impl.Main; import fr.hashimiste.impl.gui.component.PreviewComponent; import fr.hashimiste.impl.gui.jeu.Jeu; import fr.hashimiste.impl.jeu.GrilleImpl; @@ -15,8 +15,6 @@ import java.awt.*; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; -import java.awt.image.BufferedImage; -import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -26,17 +24,8 @@ */ public class ModeLibre extends JFrameTemplateProfil implements Debuggable { - public static final PreviewComponent GRILLE_VIDE_PREVIEW = new PreviewComponent(new GrilleImpl(-1, new Dimension(7, 7), Difficulte.FACILE, false, new ArrayList<>())) { - @Override - protected void paintComponent(Graphics g) { - super.paintComponent(g); - BufferedImage logo = AppImage.INSTANCE.getLogo(true); - double factor = Math.min((getSize().getWidth() - 5) / logo.getWidth(), (getSize().getHeight() - 5) / logo.getHeight()); - int zeroX = (int) ((getSize().width / 2d) - ((logo.getWidth() * factor) / 2)); - int zeroY = (int) ((getSize().height / 2d) - ((logo.getHeight() * factor) / 2)); - g.drawImage(logo, zeroX, zeroY, (int) (logo.getWidth() * factor), (int) (logo.getHeight() * factor), null); - } - }; + public static final PreviewComponent GRILLE_VIDE_PREVIEW = new PreviewComponent(null); + public static final Grille GRILLE_VIDE = new GrilleImpl(new Dimension(0, 0), Difficulte.FACILE, false, false, null); private final JPanel centre = new JPanel(); private final JPanel bas = new JPanel(); @@ -88,6 +77,9 @@ public ModeLibre(JFrameTemplateProfil parent) { } for (Grille grille : grilles) { + if (!grille.estJouable() && !Main.DEVELOPMENT) { + continue; + } JPanel panel; switch (grille.getDifficulte()) { case FACILE: @@ -147,7 +139,7 @@ public void mousePressed(MouseEvent e) { } for (JPanel panel : panelDifficulte) { for (int i = panel.getComponentCount(); i < 10; i++) { - panel.add(new PreviewComponent(null)); + panel.add(new PreviewComponent(GRILLE_VIDE)); } } @@ -192,7 +184,7 @@ public String getDebugInfo() { .filter(PreviewComponent.class::isInstance) .map(PreviewComponent.class::cast) .map(PreviewComponent::getGrille) - .map(c -> !c.estEnregistre() || c.getId() == -1 ? "EMPTY" : c.toString()) + .map(c -> c == null || !c.estEnregistre() || c.getId() == -1 ? "EMPTY" : c.toString()) .findFirst() .orElse(null) ); From 3e3c0eecd966ec1e7b03e5190b72d02b04e63f58 Mon Sep 17 00:00:00 2001 From: Antoine Date: Fri, 12 Apr 2024 13:05:12 +0200 Subject: [PATCH 15/31] Fix `+` et filtre du profil system(1) --- .../fr/hashimiste/impl/gui/menu/ProfilSelection.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/fr/hashimiste/impl/gui/menu/ProfilSelection.java b/src/main/java/fr/hashimiste/impl/gui/menu/ProfilSelection.java index ecd9757..e2010ef 100644 --- a/src/main/java/fr/hashimiste/impl/gui/menu/ProfilSelection.java +++ b/src/main/java/fr/hashimiste/impl/gui/menu/ProfilSelection.java @@ -4,6 +4,7 @@ import fr.hashimiste.core.gui.JFrameTemplate; import fr.hashimiste.core.joueur.Profil; import fr.hashimiste.core.utils.StringUtils; +import fr.hashimiste.impl.Main; import fr.hashimiste.impl.joueur.ProfilImpl; import javax.swing.*; @@ -61,10 +62,13 @@ public ProfilSelection(File propertiesFile, Stockage stockage) throws HeadlessEx private void afficherListe() { comptePanel.removeAll(); for (Profil profil : stockage.charger(Profil.class)) { + if (profil.getId() == 1 && !Main.DEVELOPMENT) { // Ignore system profile + continue; + } afficherProfil(profil.getNom(), this::chargerProfil, this::suppressionProfil); comptePanel.add(Box.createHorizontalStrut(ESPACE_ENTRE_PROFILS)); } - afficherProfil("+", this::ajouterProfil); + afficherProfil("\0+\0", this::ajouterProfil); comptePanel.revalidate(); comptePanel.repaint(); } @@ -87,7 +91,7 @@ private void afficherProfil(String label, Consumer clickGauche) { * @param clickDroit l'action à effectuer lors d'un clic droit. */ private void afficherProfil(String label, Consumer clickGauche, Consumer clickDroit) { - JButton but = new JButton(label.equals("+") ? " " : label); + JButton but = new JButton(label.equals("\0+\0") ? " " : label); but.setIcon(new ImageIcon(dessineInitiales(label))); but.setBackground(theme.getButtonColor()); but.setForeground(theme.getButtonTextColor()); @@ -122,6 +126,9 @@ private BufferedImage dessineInitiales(String label) { initials.append(tmp.charAt(tmp.indexOf(" ") + 1)); tmp = tmp.substring(tmp.indexOf(" ") + 1); } + if (label.equals("\0+\0")) { + initials = new StringBuilder("+"); + } int width = 16 * initials.length(); BufferedImage initialIcon = new BufferedImage(width, 16, BufferedImage.TYPE_INT_ARGB); From 82acc6438f1d941081648fced7475cdc14857619 Mon Sep 17 00:00:00 2001 From: Antoine Date: Fri, 12 Apr 2024 13:05:24 +0200 Subject: [PATCH 16/31] Fix test --- src/test/java/fr/hashimiste/impl/jeu/AideTest.java | 6 +++--- src/test/java/fr/hashimiste/impl/jeu/TechniqueTest.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/fr/hashimiste/impl/jeu/AideTest.java b/src/test/java/fr/hashimiste/impl/jeu/AideTest.java index 0800243..f55c8c6 100644 --- a/src/test/java/fr/hashimiste/impl/jeu/AideTest.java +++ b/src/test/java/fr/hashimiste/impl/jeu/AideTest.java @@ -25,7 +25,7 @@ public class AideTest { */ @BeforeAll public static void initAll() { - g = new GrilleImpl(new Dimension(6, 6), Difficulte.MOYEN, false); + g = new GrilleImpl(new Dimension(6, 6), Difficulte.MOYEN, false, false, null); listeIle = new ArrayList<>(); } @@ -63,7 +63,7 @@ public void testAideBordure1() { for (IleImpl i : listeIle) g.poserIle(i); - Ile ileAide = g.chercherIle().getIleU(); + Ile ileAide = g.chercherIle().getGauche(); assertSame(ileAide, listeIle.get(0)); @@ -95,7 +95,7 @@ public void testAideParite1() { for (IleImpl i : listeIle) g.poserIle(i); - Ile ileAide = g.chercherIle().getIleU(); + Ile ileAide = g.chercherIle().getGauche(); assertSame(ileAide, listeIle.get(4)); diff --git a/src/test/java/fr/hashimiste/impl/jeu/TechniqueTest.java b/src/test/java/fr/hashimiste/impl/jeu/TechniqueTest.java index c06b1c8..3deabc7 100644 --- a/src/test/java/fr/hashimiste/impl/jeu/TechniqueTest.java +++ b/src/test/java/fr/hashimiste/impl/jeu/TechniqueTest.java @@ -26,7 +26,7 @@ public class TechniqueTest { */ @BeforeAll public static void initAll() { - g = new GrilleImpl(new Dimension(8, 8), Difficulte.MOYEN, false); + g = new GrilleImpl(new Dimension(8, 8), Difficulte.MOYEN, false, false, null); listeIle = new ArrayList<>(); } From a6d6f0a93cfad21eaf95112ac3b387e5dd3d9e20 Mon Sep 17 00:00:00 2001 From: Antoine Date: Fri, 12 Apr 2024 13:05:53 +0200 Subject: [PATCH 17/31] Modification gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 1ea4797..6283a9a 100644 --- a/.gitignore +++ b/.gitignore @@ -120,3 +120,4 @@ doc/ ### Application Files ### *.db *.properties +.idea/copilot From ef720fbddd9649d768920d8208c50cd66b5df038 Mon Sep 17 00:00:00 2001 From: Antoine Date: Fri, 12 Apr 2024 13:06:22 +0200 Subject: [PATCH 18/31] =?UTF-8?q?Refactoring=20et=20ajout=20de=20m=C3=A9th?= =?UTF-8?q?ode=20d=C3=A9bug=20qui=20permet=20de=20print=20et=20afficher=20?= =?UTF-8?q?la=20ligne?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/fr/hashimiste/core/utils/DevUtils.java | 13 +++++++++++++ src/main/java/fr/hashimiste/core/utils/Union.java | 4 ++++ .../impl/data/sql/decoder/HistoriqueDecoder.java | 1 - 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/main/java/fr/hashimiste/core/utils/DevUtils.java diff --git a/src/main/java/fr/hashimiste/core/utils/DevUtils.java b/src/main/java/fr/hashimiste/core/utils/DevUtils.java new file mode 100644 index 0000000..79543b0 --- /dev/null +++ b/src/main/java/fr/hashimiste/core/utils/DevUtils.java @@ -0,0 +1,13 @@ +package fr.hashimiste.core.utils; + +import fr.hashimiste.impl.Main; + +public class DevUtils { + public static void debug(String message) { + if (!Main.DEVELOPMENT) { + return; + } + StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace(); + System.out.println(stackTrace[Math.min(2, stackTrace.length - 2)] + " -> " + message); + } +} diff --git a/src/main/java/fr/hashimiste/core/utils/Union.java b/src/main/java/fr/hashimiste/core/utils/Union.java index f08ef04..d5763d7 100644 --- a/src/main/java/fr/hashimiste/core/utils/Union.java +++ b/src/main/java/fr/hashimiste/core/utils/Union.java @@ -2,6 +2,7 @@ /** * Représente une union de deux objets. + * * @param objet gauche * @param objet droit */ @@ -11,6 +12,7 @@ public class Union { /** * Crée une union. + * * @param gauche l'objet gauche * @param droite l'objet droit */ @@ -21,6 +23,7 @@ public Union(G gauche, D droite) { /** * Renvoie l'objet gauche. + * * @return l'objet gauche */ public G getGauche() { @@ -29,6 +32,7 @@ public G getGauche() { /** * Renvoie l'objet droit. + * * @return l'objet droit */ public D getDroite() { diff --git a/src/main/java/fr/hashimiste/impl/data/sql/decoder/HistoriqueDecoder.java b/src/main/java/fr/hashimiste/impl/data/sql/decoder/HistoriqueDecoder.java index d1ca79a..9f58c49 100644 --- a/src/main/java/fr/hashimiste/impl/data/sql/decoder/HistoriqueDecoder.java +++ b/src/main/java/fr/hashimiste/impl/data/sql/decoder/HistoriqueDecoder.java @@ -5,7 +5,6 @@ import fr.hashimiste.core.jeu.Grille; import fr.hashimiste.core.jeu.Historique; import fr.hashimiste.core.jeu.Ile; -import fr.hashimiste.core.utils.DevUtils; import fr.hashimiste.impl.data.sql.SQLStockage; import fr.hashimiste.impl.data.sql.filter.EqFilter; From 72bca640cb01ac049a879c0353e6df2ee13e568f Mon Sep 17 00:00:00 2001 From: Antoine Date: Fri, 12 Apr 2024 13:10:15 +0200 Subject: [PATCH 19/31] Fix refactoring --- src/main/resources/sql/startup.sql | 1701 ++++++++++------------------ 1 file changed, 567 insertions(+), 1134 deletions(-) diff --git a/src/main/resources/sql/startup.sql b/src/main/resources/sql/startup.sql index c67ea85..df74d14 100644 --- a/src/main/resources/sql/startup.sql +++ b/src/main/resources/sql/startup.sql @@ -1,1145 +1,578 @@ --- Insert system profile -INSERT OR IGNORE INTO profil (`id_profil`, `nom`) -VALUES (1, 'system'); +-- Insert system profil +INSERT OR IGNORE INTO profil (`id_profil`, `nom`) VALUES (1, 'system'); -- Insert ile -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1, 1, 0, 0, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (2, 1, 0, 2, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (3, 1, 0, 4, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (4, 1, 0, 6, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (5, 1, 0, 8, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (6, 1, 1, 1, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (7, 1, 1, 3, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (8, 1, 1, 5, 5); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (9, 1, 1, 7, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (10, 1, 1, 9, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (11, 1, 2, 0, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (12, 1, 2, 6, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (13, 1, 2, 8, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (14, 1, 3, 1, 5); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (15, 1, 3, 3, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (16, 1, 3, 9, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (17, 1, 4, 2, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (18, 1, 4, 5, 7); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (19, 1, 4, 7, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (20, 1, 5, 0, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (21, 1, 5, 8, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (22, 1, 6, 1, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (23, 1, 6, 3, 6); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (24, 1, 6, 5, 6); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (25, 1, 7, 7, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (26, 1, 7, 9, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (27, 1, 8, 0, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (28, 1, 8, 3, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (29, 1, 8, 5, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (30, 1, 8, 8, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (31, 1, 9, 2, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (32, 1, 9, 4, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (33, 1, 9, 6, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (34, 1, 9, 9, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (35, 1, 0, 0, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (36, 1, 0, 2, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (37, 1, 0, 4, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (38, 1, 0, 6, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (39, 1, 0, 8, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (40, 1, 1, 1, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (41, 1, 1, 3, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (42, 1, 1, 5, 5); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (43, 1, 1, 7, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (44, 1, 1, 9, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (45, 1, 2, 0, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (46, 1, 2, 6, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (47, 1, 2, 8, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (48, 1, 3, 1, 5); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (49, 1, 3, 3, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (50, 1, 3, 9, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (51, 1, 4, 2, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (52, 1, 4, 5, 7); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (53, 1, 4, 7, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (54, 1, 5, 0, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (55, 1, 5, 8, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (56, 1, 6, 1, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (57, 1, 6, 3, 6); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (58, 1, 6, 5, 6); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (59, 1, 7, 7, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (60, 1, 7, 9, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (61, 1, 8, 0, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (62, 1, 8, 3, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (63, 1, 8, 5, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (64, 1, 8, 8, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (65, 1, 9, 2, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (66, 1, 9, 4, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (67, 1, 9, 6, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (68, 1, 9, 9, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (69, 2, 0, 1, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (70, 2, 0, 3, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (71, 2, 0, 6, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (72, 2, 2, 0, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (73, 2, 2, 2, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (74, 2, 2, 5, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (75, 2, 3, 6, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (76, 2, 4, 0, 5); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (77, 2, 4, 2, 5); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (78, 2, 4, 4, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (79, 2, 5, 3, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (80, 2, 5, 5, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (81, 2, 6, 0, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (82, 2, 6, 2, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (83, 2, 6, 4, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (84, 2, 6, 6, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (85, 3, 0, 0, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (86, 3, 0, 3, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (87, 3, 0, 5, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (88, 3, 0, 7, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (89, 3, 1, 1, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (90, 3, 1, 4, 5); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (91, 3, 1, 6, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (92, 3, 2, 0, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (93, 3, 2, 5, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (94, 3, 2, 7, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (95, 3, 3, 2, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (96, 3, 3, 4, 8); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (97, 3, 3, 6, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (98, 3, 4, 1, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (99, 3, 5, 0, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (100, 3, 5, 2, 6); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (101, 3, 5, 4, 7); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (102, 3, 5, 7, 5); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (103, 3, 7, 0, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (104, 3, 7, 2, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (105, 3, 7, 4, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (106, 3, 7, 7, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (107, 4, 0, 0, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (108, 4, 0, 2, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (109, 4, 0, 5, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (110, 4, 0, 7, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (111, 4, 1, 1, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (112, 4, 1, 4, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (113, 4, 1, 6, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (114, 4, 2, 7, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (115, 4, 3, 0, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (116, 4, 3, 2, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (117, 4, 3, 4, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (118, 4, 3, 6, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (119, 4, 4, 1, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (120, 4, 4, 3, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (121, 4, 4, 5, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (122, 4, 4, 7, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (123, 4, 5, 0, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (124, 4, 5, 2, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (125, 4, 5, 4, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (126, 4, 5, 6, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (127, 4, 6, 7, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (128, 4, 7, 1, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (129, 4, 7, 3, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (130, 4, 7, 6, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (131, 5, 0, 0, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (132, 5, 0, 2, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (133, 5, 0, 4, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (134, 5, 0, 6, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (135, 5, 0, 8, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (136, 5, 1, 1, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (137, 5, 1, 3, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (138, 5, 1, 5, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (139, 5, 1, 9, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (140, 5, 2, 0, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (141, 5, 2, 2, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (142, 5, 2, 4, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (143, 5, 2, 7, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (144, 5, 3, 1, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (145, 5, 3, 9, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (146, 5, 4, 2, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (147, 5, 4, 4, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (148, 5, 4, 6, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (149, 5, 5, 0, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (150, 5, 5, 5, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (151, 5, 5, 7, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (152, 5, 6, 3, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (153, 5, 6, 6, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (154, 5, 6, 9, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (155, 5, 7, 1, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (156, 5, 7, 5, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (157, 5, 7, 7, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (158, 5, 8, 0, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (159, 5, 8, 2, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (160, 5, 8, 4, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (161, 5, 8, 6, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (162, 5, 9, 1, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (163, 5, 9, 3, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (164, 5, 9, 5, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (165, 5, 9, 7, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (166, 5, 9, 9, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (167, 6, 0, 1, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (168, 6, 0, 4, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (169, 6, 0, 7, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (170, 6, 0, 9, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (171, 6, 1, 0, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (172, 6, 2, 1, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (173, 6, 2, 3, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (174, 6, 2, 5, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (175, 6, 2, 8, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (176, 6, 3, 0, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (177, 6, 3, 2, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (178, 6, 3, 6, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (179, 6, 3, 9, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (180, 6, 4, 1, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (181, 6, 4, 3, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (182, 6, 4, 5, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (183, 6, 4, 8, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (184, 6, 5, 2, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (185, 6, 5, 4, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (186, 6, 5, 9, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (187, 6, 6, 0, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (188, 6, 6, 6, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (189, 6, 6, 8, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (190, 6, 7, 1, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (191, 6, 7, 3, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (192, 6, 7, 5, 5); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (193, 6, 7, 9, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (194, 6, 8, 6, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (195, 6, 8, 8, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (196, 6, 9, 0, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (197, 6, 9, 2, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (198, 6, 9, 5, 5); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (199, 6, 9, 7, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (200, 6, 9, 9, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (201, 7, 0, 1, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (202, 7, 0, 4, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (203, 7, 0, 7, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (204, 7, 0, 9, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (205, 7, 1, 0, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (206, 7, 1, 3, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (207, 7, 1, 5, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (208, 7, 1, 8, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (209, 7, 2, 4, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (210, 7, 2, 7, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (211, 7, 2, 9, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (212, 7, 3, 0, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (213, 7, 3, 2, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (214, 7, 3, 5, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (215, 7, 3, 8, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (216, 7, 4, 1, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (217, 7, 4, 4, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (218, 7, 4, 6, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (219, 7, 4, 9, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (220, 7, 5, 0, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (221, 7, 5, 2, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (222, 7, 5, 5, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (223, 7, 5, 8, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (224, 7, 6, 1, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (225, 7, 6, 3, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (226, 7, 6, 6, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (227, 7, 6, 9, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (228, 7, 7, 0, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (229, 7, 7, 2, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (230, 7, 7, 4, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (231, 7, 8, 1, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (232, 7, 8, 3, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (233, 7, 8, 5, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (234, 7, 8, 8, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (235, 7, 9, 0, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (236, 7, 9, 2, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (237, 7, 9, 4, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (238, 7, 9, 6, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (239, 7, 9, 9, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (240, 8, 0, 0, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (241, 8, 0, 3, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (242, 8, 0, 5, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (243, 8, 0, 7, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (244, 8, 0, 9, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (245, 8, 1, 1, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (246, 8, 1, 4, 5); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (247, 8, 1, 6, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (248, 8, 1, 8, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (249, 8, 2, 3, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (250, 8, 2, 9, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (251, 8, 3, 0, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (252, 8, 3, 2, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (253, 8, 3, 4, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (254, 8, 3, 7, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (255, 8, 4, 1, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (256, 8, 4, 3, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (257, 8, 4, 6, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (258, 8, 4, 8, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (259, 8, 5, 0, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (260, 8, 5, 2, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (261, 8, 5, 5, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (262, 8, 5, 9, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (263, 8, 6, 8, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (264, 8, 7, 3, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (265, 8, 7, 6, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (266, 8, 7, 9, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (267, 8, 8, 0, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (268, 8, 8, 2, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (269, 8, 8, 5, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (270, 8, 8, 8, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (271, 8, 9, 1, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (272, 8, 9, 4, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (273, 8, 9, 7, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (274, 8, 9, 9, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (275, 9, 0, 0, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (276, 9, 0, 2, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (277, 9, 0, 4, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (278, 9, 0, 6, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (279, 9, 0, 8, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (280, 9, 1, 1, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (281, 9, 1, 3, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (282, 9, 1, 9, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (283, 9, 2, 0, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (284, 9, 2, 2, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (285, 9, 2, 4, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (286, 9, 2, 7, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (287, 9, 3, 6, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (288, 9, 3, 8, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (289, 9, 4, 1, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (290, 9, 4, 4, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (291, 9, 4, 7, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (292, 9, 4, 9, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (293, 9, 5, 5, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (294, 9, 5, 8, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (295, 9, 6, 0, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (296, 9, 6, 2, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (297, 9, 6, 4, 5); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (298, 9, 7, 5, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (299, 9, 7, 7, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (300, 9, 7, 9, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (301, 9, 8, 0, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (302, 9, 8, 2, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (303, 9, 8, 4, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (304, 9, 9, 1, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (305, 9, 9, 3, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (306, 9, 9, 5, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (307, 9, 9, 7, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (308, 9, 9, 9, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (309, 10, 0, 1, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (310, 10, 0, 3, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (311, 10, 0, 6, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (312, 10, 0, 9, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (313, 10, 1, 0, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (314, 10, 1, 7, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (315, 10, 2, 2, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (316, 10, 2, 4, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (317, 10, 2, 6, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (318, 10, 3, 0, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (319, 10, 3, 3, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (320, 10, 3, 7, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (321, 10, 3, 9, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (322, 10, 4, 1, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (323, 10, 4, 4, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (324, 10, 4, 6, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (325, 10, 5, 2, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (326, 10, 5, 7, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (327, 10, 5, 9, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (328, 10, 6, 0, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (329, 10, 6, 4, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (330, 10, 6, 6, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (331, 10, 6, 8, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (332, 10, 7, 1, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (333, 10, 7, 3, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (334, 10, 7, 5, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (335, 10, 7, 7, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (336, 10, 7, 9, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (337, 10, 8, 0, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (338, 10, 8, 2, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (339, 10, 8, 4, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (340, 10, 8, 6, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (341, 10, 8, 8, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (342, 10, 9, 1, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (343, 10, 9, 3, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (344, 10, 9, 5, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (345, 10, 9, 7, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (346, 10, 9, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1, 1, 0, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (2, 1, 0, 2, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (3, 1, 0, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (4, 1, 0, 6, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (5, 1, 0, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (6, 1, 1, 1, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (7, 1, 1, 3, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (8, 1, 1, 5, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (9, 1, 1, 7, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (10, 1, 1, 9, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (11, 1, 2, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (12, 1, 2, 6, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (13, 1, 2, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (14, 1, 3, 1, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (15, 1, 3, 3, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (16, 1, 3, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (17, 1, 4, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (18, 1, 4, 5, 7); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (19, 1, 4, 7, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (20, 1, 5, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (21, 1, 5, 8, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (22, 1, 6, 1, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (23, 1, 6, 3, 6); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (24, 1, 6, 5, 6); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (25, 1, 7, 7, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (26, 1, 7, 9, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (27, 1, 8, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (28, 1, 8, 3, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (29, 1, 8, 5, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (30, 1, 8, 8, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (31, 1, 9, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (32, 1, 9, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (33, 1, 9, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (34, 1, 9, 9, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (35, 1, 0, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (36, 1, 0, 2, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (37, 1, 0, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (38, 1, 0, 6, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (39, 1, 0, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (40, 1, 1, 1, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (41, 1, 1, 3, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (42, 1, 1, 5, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (43, 1, 1, 7, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (44, 1, 1, 9, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (45, 1, 2, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (46, 1, 2, 6, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (47, 1, 2, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (48, 1, 3, 1, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (49, 1, 3, 3, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (50, 1, 3, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (51, 1, 4, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (52, 1, 4, 5, 7); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (53, 1, 4, 7, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (54, 1, 5, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (55, 1, 5, 8, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (56, 1, 6, 1, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (57, 1, 6, 3, 6); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (58, 1, 6, 5, 6); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (59, 1, 7, 7, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (60, 1, 7, 9, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (61, 1, 8, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (62, 1, 8, 3, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (63, 1, 8, 5, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (64, 1, 8, 8, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (65, 1, 9, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (66, 1, 9, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (67, 1, 9, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (68, 1, 9, 9, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (69, 2, 0, 1, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (70, 2, 0, 3, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (71, 2, 0, 6, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (72, 2, 2, 0, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (73, 2, 2, 2, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (74, 2, 2, 5, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (75, 2, 3, 6, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (76, 2, 4, 0, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (77, 2, 4, 2, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (78, 2, 4, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (79, 2, 5, 3, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (80, 2, 5, 5, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (81, 2, 6, 0, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (82, 2, 6, 2, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (83, 2, 6, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (84, 2, 6, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (85, 3, 0, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (86, 3, 0, 3, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (87, 3, 0, 5, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (88, 3, 0, 7, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (89, 3, 1, 1, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (90, 3, 1, 4, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (91, 3, 1, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (92, 3, 2, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (93, 3, 2, 5, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (94, 3, 2, 7, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (95, 3, 3, 2, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (96, 3, 3, 4, 8); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (97, 3, 3, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (98, 3, 4, 1, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (99, 3, 5, 0, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (100, 3, 5, 2, 6); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (101, 3, 5, 4, 7); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (102, 3, 5, 7, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (103, 3, 7, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (104, 3, 7, 2, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (105, 3, 7, 4, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (106, 3, 7, 7, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (107, 4, 0, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (108, 4, 0, 2, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (109, 4, 0, 5, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (110, 4, 0, 7, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (111, 4, 1, 1, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (112, 4, 1, 4, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (113, 4, 1, 6, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (114, 4, 2, 7, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (115, 4, 3, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (116, 4, 3, 2, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (117, 4, 3, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (118, 4, 3, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (119, 4, 4, 1, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (120, 4, 4, 3, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (121, 4, 4, 5, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (122, 4, 4, 7, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (123, 4, 5, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (124, 4, 5, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (125, 4, 5, 4, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (126, 4, 5, 6, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (127, 4, 6, 7, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (128, 4, 7, 1, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (129, 4, 7, 3, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (130, 4, 7, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (131, 5, 0, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (132, 5, 0, 2, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (133, 5, 0, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (134, 5, 0, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (135, 5, 0, 8, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (136, 5, 1, 1, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (137, 5, 1, 3, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (138, 5, 1, 5, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (139, 5, 1, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (140, 5, 2, 0, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (141, 5, 2, 2, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (142, 5, 2, 4, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (143, 5, 2, 7, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (144, 5, 3, 1, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (145, 5, 3, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (146, 5, 4, 2, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (147, 5, 4, 4, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (148, 5, 4, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (149, 5, 5, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (150, 5, 5, 5, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (151, 5, 5, 7, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (152, 5, 6, 3, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (153, 5, 6, 6, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (154, 5, 6, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (155, 5, 7, 1, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (156, 5, 7, 5, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (157, 5, 7, 7, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (158, 5, 8, 0, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (159, 5, 8, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (160, 5, 8, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (161, 5, 8, 6, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (162, 5, 9, 1, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (163, 5, 9, 3, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (164, 5, 9, 5, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (165, 5, 9, 7, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (166, 5, 9, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (167, 6, 0, 1, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (168, 6, 0, 4, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (169, 6, 0, 7, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (170, 6, 0, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (171, 6, 1, 0, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (172, 6, 2, 1, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (173, 6, 2, 3, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (174, 6, 2, 5, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (175, 6, 2, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (176, 6, 3, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (177, 6, 3, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (178, 6, 3, 6, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (179, 6, 3, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (180, 6, 4, 1, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (181, 6, 4, 3, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (182, 6, 4, 5, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (183, 6, 4, 8, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (184, 6, 5, 2, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (185, 6, 5, 4, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (186, 6, 5, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (187, 6, 6, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (188, 6, 6, 6, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (189, 6, 6, 8, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (190, 6, 7, 1, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (191, 6, 7, 3, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (192, 6, 7, 5, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (193, 6, 7, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (194, 6, 8, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (195, 6, 8, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (196, 6, 9, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (197, 6, 9, 2, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (198, 6, 9, 5, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (199, 6, 9, 7, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (200, 6, 9, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (201, 7, 0, 1, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (202, 7, 0, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (203, 7, 0, 7, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (204, 7, 0, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (205, 7, 1, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (206, 7, 1, 3, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (207, 7, 1, 5, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (208, 7, 1, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (209, 7, 2, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (210, 7, 2, 7, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (211, 7, 2, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (212, 7, 3, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (213, 7, 3, 2, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (214, 7, 3, 5, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (215, 7, 3, 8, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (216, 7, 4, 1, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (217, 7, 4, 4, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (218, 7, 4, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (219, 7, 4, 9, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (220, 7, 5, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (221, 7, 5, 2, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (222, 7, 5, 5, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (223, 7, 5, 8, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (224, 7, 6, 1, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (225, 7, 6, 3, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (226, 7, 6, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (227, 7, 6, 9, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (228, 7, 7, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (229, 7, 7, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (230, 7, 7, 4, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (231, 7, 8, 1, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (232, 7, 8, 3, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (233, 7, 8, 5, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (234, 7, 8, 8, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (235, 7, 9, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (236, 7, 9, 2, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (237, 7, 9, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (238, 7, 9, 6, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (239, 7, 9, 9, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (240, 8, 0, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (241, 8, 0, 3, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (242, 8, 0, 5, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (243, 8, 0, 7, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (244, 8, 0, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (245, 8, 1, 1, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (246, 8, 1, 4, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (247, 8, 1, 6, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (248, 8, 1, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (249, 8, 2, 3, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (250, 8, 2, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (251, 8, 3, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (252, 8, 3, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (253, 8, 3, 4, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (254, 8, 3, 7, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (255, 8, 4, 1, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (256, 8, 4, 3, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (257, 8, 4, 6, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (258, 8, 4, 8, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (259, 8, 5, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (260, 8, 5, 2, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (261, 8, 5, 5, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (262, 8, 5, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (263, 8, 6, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (264, 8, 7, 3, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (265, 8, 7, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (266, 8, 7, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (267, 8, 8, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (268, 8, 8, 2, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (269, 8, 8, 5, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (270, 8, 8, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (271, 8, 9, 1, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (272, 8, 9, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (273, 8, 9, 7, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (274, 8, 9, 9, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (275, 9, 0, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (276, 9, 0, 2, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (277, 9, 0, 4, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (278, 9, 0, 6, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (279, 9, 0, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (280, 9, 1, 1, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (281, 9, 1, 3, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (282, 9, 1, 9, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (283, 9, 2, 0, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (284, 9, 2, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (285, 9, 2, 4, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (286, 9, 2, 7, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (287, 9, 3, 6, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (288, 9, 3, 8, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (289, 9, 4, 1, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (290, 9, 4, 4, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (291, 9, 4, 7, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (292, 9, 4, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (293, 9, 5, 5, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (294, 9, 5, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (295, 9, 6, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (296, 9, 6, 2, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (297, 9, 6, 4, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (298, 9, 7, 5, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (299, 9, 7, 7, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (300, 9, 7, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (301, 9, 8, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (302, 9, 8, 2, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (303, 9, 8, 4, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (304, 9, 9, 1, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (305, 9, 9, 3, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (306, 9, 9, 5, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (307, 9, 9, 7, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (308, 9, 9, 9, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (309, 10, 0, 1, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (310, 10, 0, 3, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (311, 10, 0, 6, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (312, 10, 0, 9, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (313, 10, 1, 0, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (314, 10, 1, 7, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (315, 10, 2, 2, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (316, 10, 2, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (317, 10, 2, 6, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (318, 10, 3, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (319, 10, 3, 3, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (320, 10, 3, 7, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (321, 10, 3, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (322, 10, 4, 1, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (323, 10, 4, 4, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (324, 10, 4, 6, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (325, 10, 5, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (326, 10, 5, 7, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (327, 10, 5, 9, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (328, 10, 6, 0, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (329, 10, 6, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (330, 10, 6, 6, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (331, 10, 6, 8, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (332, 10, 7, 1, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (333, 10, 7, 3, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (334, 10, 7, 5, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (335, 10, 7, 7, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (336, 10, 7, 9, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (337, 10, 8, 0, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (338, 10, 8, 2, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (339, 10, 8, 4, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (340, 10, 8, 6, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (341, 10, 8, 8, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (342, 10, 9, 1, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (343, 10, 9, 3, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (344, 10, 9, 5, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (345, 10, 9, 7, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (346, 10, 9, 9, 3); -- Insert map -INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) -VALUES (1, 0, 10, 10, 1); -INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) -VALUES (2, 0, 7, 7, 1); -INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) -VALUES (3, 0, 8, 8, 1); -INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) -VALUES (4, 1, 8, 8, 1); -INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) -VALUES (5, 1, 10, 10, 1); -INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) -VALUES (6, 1, 10, 10, 1); -INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) -VALUES (7, 2, 10, 10, 1); -INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) -VALUES (8, 1, 10, 10, 1); -INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) -VALUES (9, 2, 10, 10, 1); -INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) -VALUES (10, 2, 10, 10, 1); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) VALUES (1, 0, 10, 10, 1); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) VALUES (2, 0, 7, 7, 1); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) VALUES (3, 0, 8, 8, 1); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) VALUES (4, 1, 8, 8, 1); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) VALUES (5, 1, 10, 10, 1); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) VALUES (6, 1, 10, 10, 1); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) VALUES (7, 2, 10, 10, 1); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) VALUES (8, 1, 10, 10, 1); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) VALUES (9, 2, 10, 10, 1); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `aventure`) VALUES (10, 2, 10, 10, 1); -- Technique preview ile -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1000, 1000, 0, 0, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1001, 1000, 2, 0, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1002, 1000, 4, 0, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1003, 1000, 3, 1, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1004, 1000, 5, 1, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1005, 1000, 0, 2, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1006, 1000, 2, 2, 7); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1007, 1000, 4, 2, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1008, 1000, 3, 3, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1009, 1000, 5, 3, 5); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1010, 1000, 2, 4, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1011, 1000, 4, 4, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1012, 1000, 0, 5, 3); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1013, 1000, 3, 5, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1014, 1000, 5, 5, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1015, 1001, 0, 0, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1016, 1001, 3, 0, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1017, 1001, 5, 0, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1018, 1001, 2, 1, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1019, 1001, 1, 2, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1020, 1001, 3, 2, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1021, 1001, 5, 2, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1022, 1001, 0, 3, - 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1023, 1001, 2, 3, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1024, 1001, 1, 4, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1025, 1001, 3, 4, - 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1026, 1001, 5, 4, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1027, 1001, 0, 5, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1028, 1001, 2, 5, 2); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1029, 1001, 4, 5, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1030, 1002, 0, 0, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1031, 1002, 2, 0, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1032, 1002, 5, 0, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1033, 1002, 0, 2, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1034, 1002, 2, 2, 8); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1035, 1002, 4, 2, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1036, 1002, 1, 3, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1037, 1002, 3, 3, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1038, 1002, 5, 3, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1039, 1002, 0, 4, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1040, 1002, 2, 4, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1041, 1002, 4, 4, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1042, 1002, 1, 5, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1043, 1002, 3, 5, 6); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1044, 1002, 5, 5, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1045, 1003, 0, 0, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1046, 1003, 2, 0, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1047, 1003, 5, 0, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1048, 1003, 3, 1, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1049, 1003, 0, 2, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1050, 1003, 2, 2, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1051, 1003, 4, 2, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1052, 1003, 3, 3, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1053, 1003, 5, 3, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1054, 1003, 0, 4, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1055, 1003, 2, 4, 4); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1056, 1003, 4, 4, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1057, 1003, 1, 5, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1058, 1003, 3, 5, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1059, 1003, 5, 5, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1060, 1004, 0, 0, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1061, 1004, 2, 0, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1062, 1004, 4, 0, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1063, 1004, 5, 1, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1064, 1004, 0, 2, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1065, 1004, 2, 2, 6); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1066, 1004, 4, 2, 1); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1067, 1004, 3, 3, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1068, 1004, 5, 3, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1069, 1004, 0, 4, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1070, 1004, 2, 4, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1071, 1004, 4, 4, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1072, 1004, 1, 5, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1073, 1004, 3, 5, -99); -INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) -VALUES (1074, 1004, 5, 5, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1000, 1000, 0, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1001, 1000, 2, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1002, 1000, 4, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1003, 1000, 3, 1, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1004, 1000, 5, 1, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1005, 1000, 0, 2, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1006, 1000, 2, 2, 7); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1007, 1000, 4, 2, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1008, 1000, 3, 3, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1009, 1000, 5, 3, 5); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1010, 1000, 2, 4, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1011, 1000, 4, 4, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1012, 1000, 0, 5, 3); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1013, 1000, 3, 5, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1014, 1000, 5, 5, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1015, 1001, 0, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1016, 1001, 3, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1017, 1001, 5, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1018, 1001, 2, 1, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1019, 1001, 1, 2, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1020, 1001, 3, 2, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1021, 1001, 5, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1022, 1001, 0, 3, - 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1023, 1001, 2, 3, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1024, 1001, 1, 4, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1025, 1001, 3, 4, - 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1026, 1001, 5, 4, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1027, 1001, 0, 5, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1028, 1001, 2, 5, 2); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1029, 1001, 4, 5, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1030, 1002, 0, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1031, 1002, 2, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1032, 1002, 5, 0, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1033, 1002, 0, 2, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1034, 1002, 2, 2, 8); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1035, 1002, 4, 2, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1036, 1002, 1, 3, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1037, 1002, 3, 3, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1038, 1002, 5, 3, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1039, 1002, 0, 4, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1040, 1002, 2, 4, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1041, 1002, 4, 4, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1042, 1002, 1, 5, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1043, 1002, 3, 5, 6); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1044, 1002, 5, 5, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1045, 1003, 0, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1046, 1003, 2, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1047, 1003, 5, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1048, 1003, 3, 1, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1049, 1003, 0, 2, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1050, 1003, 2, 2, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1051, 1003, 4, 2, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1052, 1003, 3, 3, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1053, 1003, 5, 3, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1054, 1003, 0, 4, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1055, 1003, 2, 4, 4); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1056, 1003, 4, 4, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1057, 1003, 1, 5, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1058, 1003, 3, 5, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1059, 1003, 5, 5, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1060, 1004, 0, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1061, 1004, 2, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1062, 1004, 4, 0, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1063, 1004, 5, 1, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1064, 1004, 0, 2, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1065, 1004, 2, 2, 6); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1066, 1004, 4, 2, 1); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1067, 1004, 3, 3, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1068, 1004, 5, 3, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1069, 1004, 0, 4, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1070, 1004, 2, 4, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1071, 1004, 4, 4, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1072, 1004, 1, 5, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1073, 1004, 3, 5, -99); +INSERT OR IGNORE INTO ile (`id_ile`, `id_map`, `x`, `y`, `n`) VALUES (1074, 1004, 5, 5, -99); -- Technique preview map -INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `jouable`) -VALUES (1000, 0, 6, 6, 0); -INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `jouable`) -VALUES (1001, 0, 6, 6, 0); -INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `jouable`) -VALUES (1002, 0, 6, 6, 0); -INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `jouable`) -VALUES (1003, 0, 6, 6, 0); -INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `jouable`) -VALUES (1004, 0, 6, 6, 0); - +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `jouable`) VALUES (1000, 0, 6, 6, 0); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `jouable`) VALUES (1001, 0, 6, 6, 0); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `jouable`) VALUES (1002, 0, 6, 6, 0); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `jouable`) VALUES (1003, 0, 6, 6, 0); +INSERT OR IGNORE INTO map (`id_map`, `difficulte`, `largeur`, `hauteur`, `jouable`) VALUES (1004, 0, 6, 6, 0); -- Technique demo historique -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) -VALUES (1712863723957, 1000, 0, 0, 0); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712863725524, 1000, 1001, 1006, 2, 1712863723957); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712863726236, 1000, 1005, 1006, 2, 1712863725524); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712863727008, 1000, 1006, 1007, 2, 1712863726236); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712863727722, 1000, 1006, 1010, 2, 1712863727008); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712863728353, 1000, 1005, 1012, 2, 1712863727722); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712863728926, 1000, 1012, 1013, 2, 1712863728353); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712863730214, 1000, 1008, 1009, 2, 1712863728926); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712863730839, 1000, 1004, 1009, 2, 1712863730214); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712863733130, 1000, 1009, 1014, 2, 1712863730839); -INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) -VALUES (1, 'Imparite', 1712863733130); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) -VALUES (1712864033490, 1001, 0, 0, 0); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712864036888, 1001, 1022, 1027, 2, 1712864033490); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712864038574, 1001, 1025, 1026, 2, 1712864036888); -INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) -VALUES (1, 'Isolement 1 2', 1712864038574); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) -VALUES (1712865036530, 1002, 0, 0, 0); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865039023, 1002, 1031, 1034, 2, 1712865036530); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865039197, 1002, 1031, 1034, 3, 1712865039023); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865040071, 1002, 1033, 1034, 2, 1712865039197); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865040266, 1002, 1033, 1034, 3, 1712865040071); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865041002, 1002, 1034, 1035, 2, 1712865040266); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865041194, 1002, 1034, 1035, 3, 1712865041002); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865045033, 1002, 1034, 1040, 2, 1712865041194); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865045217, 1002, 1034, 1040, 3, 1712865045033); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865045918, 1002, 1031, 1032, 2, 1712865045217); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865046081, 1002, 1031, 1032, 3, 1712865045918); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865046804, 1002, 1032, 1038, 2, 1712865046081); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865046978, 1002, 1032, 1038, 3, 1712865046804); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865048456, 1002, 1037, 1043, 2, 1712865046978); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865048639, 1002, 1037, 1043, 3, 1712865048456); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865049205, 1002, 1042, 1043, 2, 1712865048639); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865049366, 1002, 1042, 1043, 3, 1712865049205); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865050144, 1002, 1043, 1044, 2, 1712865049366); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865050344, 1002, 1043, 1044, 3, 1712865050144); -INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) -VALUES (1, 'Parite', 1712865050344); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) -VALUES (1712865270460, 1003, 0, 0, 0); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865271875, 1003, 1054, 1055, 2, 1712865270460); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865272281, 1003, 1050, 1055, 2, 1712865271875); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865272438, 1003, 1050, 1055, 3, 1712865272281); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865272868, 1003, 1055, 1056, 2, 1712865272438); -INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) -VALUES (1, 'Unite 4', 1712865272868); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) -VALUES (1712865496821, 1004, 0, 0, 0); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865497747, 1004, 1061, 1065, 2, 1712865496821); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865498240, 1004, 1064, 1065, 2, 1712865497747); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712865498683, 1004, 1065, 1070, 2, 1712865498240); -INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) -VALUES (1, 'Unite 6', 1712865498683); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) VALUES (1712863723957, 1000, 0, 0, 0); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712863725524, 1000, 1001, 1006, 2, 1712863723957); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712863726236, 1000, 1005, 1006, 2, 1712863725524); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712863727008, 1000, 1006, 1007, 2, 1712863726236); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712863727722, 1000, 1006, 1010, 2, 1712863727008); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712863728353, 1000, 1005, 1012, 2, 1712863727722); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712863728926, 1000, 1012, 1013, 2, 1712863728353); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712863730214, 1000, 1008, 1009, 2, 1712863728926); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712863730839, 1000, 1004, 1009, 2, 1712863730214); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712863733130, 1000, 1009, 1014, 2, 1712863730839); +INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) VALUES (1, 'Imparite', 1712863733130); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) VALUES (1712864033490, 1001, 0, 0, 0); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712864036888, 1001, 1022, 1027, 2, 1712864033490); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712864038574, 1001, 1025, 1026, 2, 1712864036888); +INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) VALUES (1, 'Isolement 1 2', 1712864038574); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) VALUES (1712865036530, 1002, 0, 0, 0); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865039023, 1002, 1031, 1034, 2, 1712865036530); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865039197, 1002, 1031, 1034, 3, 1712865039023); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865040071, 1002, 1033, 1034, 2, 1712865039197); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865040266, 1002, 1033, 1034, 3, 1712865040071); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865041002, 1002, 1034, 1035, 2, 1712865040266); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865041194, 1002, 1034, 1035, 3, 1712865041002); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865045033, 1002, 1034, 1040, 2, 1712865041194); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865045217, 1002, 1034, 1040, 3, 1712865045033); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865045918, 1002, 1031, 1032, 2, 1712865045217); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865046081, 1002, 1031, 1032, 3, 1712865045918); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865046804, 1002, 1032, 1038, 2, 1712865046081); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865046978, 1002, 1032, 1038, 3, 1712865046804); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865048456, 1002, 1037, 1043, 2, 1712865046978); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865048639, 1002, 1037, 1043, 3, 1712865048456); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865049205, 1002, 1042, 1043, 2, 1712865048639); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865049366, 1002, 1042, 1043, 3, 1712865049205); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865050144, 1002, 1043, 1044, 2, 1712865049366); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865050344, 1002, 1043, 1044, 3, 1712865050144); +INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) VALUES (1, 'Parite', 1712865050344); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) VALUES (1712865270460, 1003, 0, 0, 0); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865271875, 1003, 1054, 1055, 2, 1712865270460); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865272281, 1003, 1050, 1055, 2, 1712865271875); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865272438, 1003, 1050, 1055, 3, 1712865272281); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865272868, 1003, 1055, 1056, 2, 1712865272438); +INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) VALUES (1, 'Unite 4', 1712865272868); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) VALUES (1712865496821, 1004, 0, 0, 0); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865497747, 1004, 1061, 1065, 2, 1712865496821); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865498240, 1004, 1064, 1065, 2, 1712865497747); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712865498683, 1004, 1065, 1070, 2, 1712865498240); +INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) VALUES (1, 'Unite 6', 1712865498683); -- Solution -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) -VALUES (1712872020552, 1, 0, 0, 0); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872024008, 1, 38, 39, 2, 1712872020552); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872024154, 1, 38, 39, 3, 1712872024008); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872024895, 1, 37, 38, 2, 1712872024154); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872025605, 1, 36, 37, 2, 1712872024895); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872026479, 1, 35, 36, 2, 1712872025605); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872026643, 1, 35, 36, 3, 1712872026479); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872027541, 1, 35, 45, 2, 1712872026643); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872028434, 1, 45, 54, 2, 1712872027541); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872029052, 1, 54, 61, 2, 1712872028434); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872029202, 1, 54, 61, 3, 1712872029052); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872030341, 1, 61, 62, 2, 1712872029202); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872031841, 1, 62, 63, 2, 1712872030341); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872033353, 1, 63, 64, 2, 1712872031841); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872034729, 1, 55, 64, 2, 1712872033353); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872034896, 1, 55, 64, 3, 1712872034729); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872035360, 1, 47, 55, 2, 1712872034896); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872036918, 1, 46, 47, 2, 1712872035360); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872039355, 1, 65, 66, 2, 1712872036918); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872039896, 1, 66, 67, 2, 1712872039355); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872040365, 1, 67, 68, 2, 1712872039896); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872041491, 1, 60, 68, 2, 1712872040365); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872042001, 1, 50, 60, 2, 1712872041491); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872043091, 1, 44, 50, 2, 1712872042001); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872043278, 1, 44, 50, 3, 1712872043091); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872044449, 1, 43, 44, 2, 1712872043278); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872044603, 1, 43, 44, 3, 1712872044449); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872047056, 1, 42, 43, 2, 1712872044603); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872047221, 1, 42, 43, 3, 1712872047056); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872050268, 1, 41, 42, 2, 1712872047221); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872051991, 1, 40, 41, 2, 1712872050268); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872053377, 1, 40, 48, 2, 1712872051991); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872055342, 1, 48, 49, 2, 1712872053377); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872055557, 1, 48, 49, 3, 1712872055342); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872056468, 1, 41, 49, 2, 1712872055557); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872056635, 1, 41, 49, 3, 1712872056468); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872058669, 1, 48, 56, 2, 1712872056635); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872058833, 1, 48, 56, 3, 1712872058669); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872060600, 1, 56, 57, 2, 1712872058833); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872060769, 1, 56, 57, 3, 1712872060600); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872063080, 1, 57, 58, 2, 1712872060769); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872063239, 1, 57, 58, 3, 1712872063080); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872063860, 1, 57, 62, 2, 1712872063239); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872064018, 1, 57, 62, 3, 1712872063860); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872064830, 1, 58, 63, 2, 1712872064018); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872064982, 1, 58, 63, 3, 1712872064830); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872066348, 1, 52, 58, 2, 1712872064982); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872066506, 1, 52, 58, 3, 1712872066348); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872067506, 1, 51, 52, 2, 1712872066506); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872068658, 1, 42, 52, 2, 1712872067506); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872068795, 1, 42, 52, 3, 1712872068658); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872070209, 1, 52, 53, 2, 1712872068795); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872070354, 1, 52, 53, 3, 1712872070209); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872071561, 1, 53, 59, 2, 1712872070354); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712872071714, 1, 53, 59, 3, 1712872071561); -INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) -VALUES (1, 'Solution 1', 1712872071714); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) -VALUES (1712880118671, 2, 0, 0, 0); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880120321, 2, 69, 70, 2, 1712880118671); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880121149, 2, 70, 71, 2, 1712880120321); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880121317, 2, 70, 71, 3, 1712880121149); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880122130, 2, 71, 75, 2, 1712880121317); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880122296, 2, 71, 75, 3, 1712880122130); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880123098, 2, 75, 84, 2, 1712880122296); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880123873, 2, 83, 84, 2, 1712880123098); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880124666, 2, 82, 83, 2, 1712880123873); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880125373, 2, 81, 82, 2, 1712880124666); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880125567, 2, 81, 82, 3, 1712880125373); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880126405, 2, 76, 81, 2, 1712880125567); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880126577, 2, 76, 81, 3, 1712880126405); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880127336, 2, 72, 76, 2, 1712880126577); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880127530, 2, 72, 76, 3, 1712880127336); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880128206, 2, 72, 73, 2, 1712880127530); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880128436, 2, 72, 73, 3, 1712880128206); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880131844, 2, 73, 74, 2, 1712880128436); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880132629, 2, 74, 80, 2, 1712880131844); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880132796, 2, 74, 80, 3, 1712880132629); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880134069, 2, 79, 80, 2, 1712880132796); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880134953, 2, 77, 82, 2, 1712880134069); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880135736, 2, 73, 77, 2, 1712880134953); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880136644, 2, 76, 77, 2, 1712880135736); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880137782, 2, 77, 78, 2, 1712880136644); -INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) -VALUES (1712880137964, 2, 77, 78, 3, 1712880137782); -INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) -VALUES (1, 'Solution 2', 1712880137964); \ No newline at end of file +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) VALUES (1712872020552, 1, 0, 0, 0); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872024008, 1, 38, 39, 2, 1712872020552); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872024154, 1, 38, 39, 3, 1712872024008); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872024895, 1, 37, 38, 2, 1712872024154); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872025605, 1, 36, 37, 2, 1712872024895); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872026479, 1, 35, 36, 2, 1712872025605); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872026643, 1, 35, 36, 3, 1712872026479); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872027541, 1, 35, 45, 2, 1712872026643); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872028434, 1, 45, 54, 2, 1712872027541); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872029052, 1, 54, 61, 2, 1712872028434); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872029202, 1, 54, 61, 3, 1712872029052); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872030341, 1, 61, 62, 2, 1712872029202); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872031841, 1, 62, 63, 2, 1712872030341); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872033353, 1, 63, 64, 2, 1712872031841); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872034729, 1, 55, 64, 2, 1712872033353); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872034896, 1, 55, 64, 3, 1712872034729); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872035360, 1, 47, 55, 2, 1712872034896); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872036918, 1, 46, 47, 2, 1712872035360); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872039355, 1, 65, 66, 2, 1712872036918); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872039896, 1, 66, 67, 2, 1712872039355); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872040365, 1, 67, 68, 2, 1712872039896); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872041491, 1, 60, 68, 2, 1712872040365); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872042001, 1, 50, 60, 2, 1712872041491); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872043091, 1, 44, 50, 2, 1712872042001); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872043278, 1, 44, 50, 3, 1712872043091); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872044449, 1, 43, 44, 2, 1712872043278); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872044603, 1, 43, 44, 3, 1712872044449); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872047056, 1, 42, 43, 2, 1712872044603); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872047221, 1, 42, 43, 3, 1712872047056); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872050268, 1, 41, 42, 2, 1712872047221); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872051991, 1, 40, 41, 2, 1712872050268); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872053377, 1, 40, 48, 2, 1712872051991); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872055342, 1, 48, 49, 2, 1712872053377); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872055557, 1, 48, 49, 3, 1712872055342); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872056468, 1, 41, 49, 2, 1712872055557); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872056635, 1, 41, 49, 3, 1712872056468); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872058669, 1, 48, 56, 2, 1712872056635); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872058833, 1, 48, 56, 3, 1712872058669); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872060600, 1, 56, 57, 2, 1712872058833); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872060769, 1, 56, 57, 3, 1712872060600); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872063080, 1, 57, 58, 2, 1712872060769); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872063239, 1, 57, 58, 3, 1712872063080); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872063860, 1, 57, 62, 2, 1712872063239); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872064018, 1, 57, 62, 3, 1712872063860); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872064830, 1, 58, 63, 2, 1712872064018); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872064982, 1, 58, 63, 3, 1712872064830); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872066348, 1, 52, 58, 2, 1712872064982); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872066506, 1, 52, 58, 3, 1712872066348); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872067506, 1, 51, 52, 2, 1712872066506); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872068658, 1, 42, 52, 2, 1712872067506); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872068795, 1, 42, 52, 3, 1712872068658); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872070209, 1, 52, 53, 2, 1712872068795); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872070354, 1, 52, 53, 3, 1712872070209); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872071561, 1, 53, 59, 2, 1712872070354); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712872071714, 1, 53, 59, 3, 1712872071561); +INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) VALUES (1, 'Solution 1', 1712872071714); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) VALUES (1712880118671, 2, 0, 0, 0); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880120321, 2, 69, 70, 2, 1712880118671); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880121149, 2, 70, 71, 2, 1712880120321); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880121317, 2, 70, 71, 3, 1712880121149); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880122130, 2, 71, 75, 2, 1712880121317); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880122296, 2, 71, 75, 3, 1712880122130); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880123098, 2, 75, 84, 2, 1712880122296); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880123873, 2, 83, 84, 2, 1712880123098); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880124666, 2, 82, 83, 2, 1712880123873); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880125373, 2, 81, 82, 2, 1712880124666); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880125567, 2, 81, 82, 3, 1712880125373); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880126405, 2, 76, 81, 2, 1712880125567); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880126577, 2, 76, 81, 3, 1712880126405); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880127336, 2, 72, 76, 2, 1712880126577); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880127530, 2, 72, 76, 3, 1712880127336); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880128206, 2, 72, 73, 2, 1712880127530); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880128436, 2, 72, 73, 3, 1712880128206); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880131844, 2, 73, 74, 2, 1712880128436); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880132629, 2, 74, 80, 2, 1712880131844); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880132796, 2, 74, 80, 3, 1712880132629); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880134069, 2, 79, 80, 2, 1712880132796); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880134953, 2, 77, 82, 2, 1712880134069); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880135736, 2, 73, 77, 2, 1712880134953); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880136644, 2, 76, 77, 2, 1712880135736); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880137782, 2, 77, 78, 2, 1712880136644); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880137964, 2, 77, 78, 3, 1712880137782); +INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) VALUES (1, 'Solution 2', 1712880137964); \ No newline at end of file From 69ae953def4a2c5cab9624a1c9188ec64d171952 Mon Sep 17 00:00:00 2001 From: Antoine Date: Fri, 12 Apr 2024 13:11:17 +0200 Subject: [PATCH 20/31] Import manquant --- src/main/java/fr/hashimiste/impl/data/sql/SQLStockage.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/fr/hashimiste/impl/data/sql/SQLStockage.java b/src/main/java/fr/hashimiste/impl/data/sql/SQLStockage.java index e03e97a..2b20975 100644 --- a/src/main/java/fr/hashimiste/impl/data/sql/SQLStockage.java +++ b/src/main/java/fr/hashimiste/impl/data/sql/SQLStockage.java @@ -14,10 +14,15 @@ import fr.hashimiste.core.joueur.Profil; import fr.hashimiste.core.joueur.Statistique; import fr.hashimiste.core.utils.Assert; +import fr.hashimiste.core.utils.DevUtils; import fr.hashimiste.impl.Main; import fr.hashimiste.impl.data.sql.decoder.*; import fr.hashimiste.impl.data.sql.encoder.*; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; import java.sql.*; import java.util.*; import java.util.function.Predicate; From 8f66a1266127179f8bdabb0aa955b6deba69eff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=A3lie=20*?= <44349276+tetelie@users.noreply.github.com> Date: Fri, 12 Apr 2024 14:56:20 +0200 Subject: [PATCH 21/31] =?UTF-8?q?Interface=20:=20ajout=20indicateur=20si?= =?UTF-8?q?=20une=20ile=20est=20compl=C3=A8te?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/gui/component/GameComponent.java | 15 +++++++++++++++ .../java/fr/hashimiste/impl/jeu/PontImpl.java | 2 ++ 2 files changed, 17 insertions(+) diff --git a/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java b/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java index 8503482..20d58bf 100644 --- a/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java +++ b/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java @@ -82,8 +82,22 @@ protected void paintComponent(Graphics g) { g2.setStroke(new BasicStroke(lineThickness)); + + g2.setColor(Color.BLACK); + // Dessiner les ponts réels for (Bridge bridge : bridges) { + + // barrer les iles complètes + if(bridge.getIle1().getNbPont() >= bridge.getIle1().getN()) + { + g2.draw(new Line2D.Float(zeroX + cell_size * bridge.getIle1().getX()+cell_size/5, zeroY +cell_size *bridge.getIle1().getY()+cell_size/5, zeroX + cell_size * bridge.getIle1().getX()+cell_size-cell_size/5, zeroY +cell_size *bridge.getIle1().getY()+cell_size-cell_size/5)); + } + if(bridge.getIle2().getNbPont() >= bridge.getIle2().getN()) + { + g2.draw(new Line2D.Float(zeroX + cell_size * bridge.getIle2().getX()+cell_size/5, zeroY +cell_size *bridge.getIle2().getY()+cell_size/5, zeroX + cell_size * bridge.getIle2().getX()+cell_size-cell_size/5, zeroY +cell_size *bridge.getIle2().getY()+cell_size-cell_size/5)); + } + g2.setColor(Color.BLACK); if (bridge.n == 2) { // si pont double if (estHorizontal(bridge)) { @@ -320,6 +334,7 @@ public void mousePressed(MouseEvent e) { // Rendre le pont double currentBridge.n = 2; onNewAction(selectedBridge.ile1, selectedBridge.ile2, Action.DEUX_PONTS); + ((GrilleImpl) getGrille()).supprimerPont(selectedBridge.ile1, selectedBridge.ile2); ((GrilleImpl) getGrille()).poserPont(selectedBridge.ile1, selectedBridge.ile2, 2); } } diff --git a/src/main/java/fr/hashimiste/impl/jeu/PontImpl.java b/src/main/java/fr/hashimiste/impl/jeu/PontImpl.java index 615ad77..6c4ffac 100644 --- a/src/main/java/fr/hashimiste/impl/jeu/PontImpl.java +++ b/src/main/java/fr/hashimiste/impl/jeu/PontImpl.java @@ -4,6 +4,8 @@ public class PontImpl implements Pont { + //todo java doc :) + private final int x; private final int y; private final int n; From ae2d2dfc1cb1ebccf034f1f775c6e420950fb94a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=A3lie=20*?= <44349276+tetelie@users.noreply.github.com> Date: Fri, 12 Apr 2024 15:16:42 +0200 Subject: [PATCH 22/31] ajout d'une verification lors de la creation d'un nouveau pont MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit vérifie lors de la creation d'un pont si une des île aux êxtremitées est pleine ou non --- .../impl/gui/component/GameComponent.java | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java b/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java index 20d58bf..985791e 100644 --- a/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java +++ b/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java @@ -89,11 +89,11 @@ protected void paintComponent(Graphics g) { for (Bridge bridge : bridges) { // barrer les iles complètes - if(bridge.getIle1().getNbPont() >= bridge.getIle1().getN()) + if(isIsleFull(bridge.getIle1())) { g2.draw(new Line2D.Float(zeroX + cell_size * bridge.getIle1().getX()+cell_size/5, zeroY +cell_size *bridge.getIle1().getY()+cell_size/5, zeroX + cell_size * bridge.getIle1().getX()+cell_size-cell_size/5, zeroY +cell_size *bridge.getIle1().getY()+cell_size-cell_size/5)); } - if(bridge.getIle2().getNbPont() >= bridge.getIle2().getN()) + if(isIsleFull(bridge.getIle2())) { g2.draw(new Line2D.Float(zeroX + cell_size * bridge.getIle2().getX()+cell_size/5, zeroY +cell_size *bridge.getIle2().getY()+cell_size/5, zeroX + cell_size * bridge.getIle2().getX()+cell_size-cell_size/5, zeroY +cell_size *bridge.getIle2().getY()+cell_size-cell_size/5)); } @@ -295,6 +295,16 @@ public int getNearestBridge(int souris_x, int souris_y) { return 0; } + /** + * Retourne si le nombre de pont relié à l'île est superieur ou égal à sa capacité + * @param ile + * @return boolean + */ + private boolean isIsleFull(Ile ile) + { + return ile.getNbPont() >= ile.getN(); + } + /** * Evenement de clique de la souris * @@ -302,8 +312,15 @@ public int getNearestBridge(int souris_x, int souris_y) { */ @Override public void mousePressed(MouseEvent e) { + double factor = Math.min((getSize().getWidth() - 5) / getGrille().getDimension().width, (getSize().getHeight() - 5) / getGrille().getDimension().height); + int zeroX = (int) ((getSize().width / 2d) - ((getGrille().getDimension().width * factor) / 2)); + int zeroY = (int) ((getSize().height / 2d) - ((getGrille().getDimension().height * factor) / 2)); + int i = (this.getWidth() - zeroX - zeroX) / getGrille().getDimension().width; + int x = (e.getX() - zeroX) / i; + int y = (e.getY() - zeroY) / i; // Si des ponts potentiels sont détectés - if (isBridgeHover()) { + if (isBridgeHover() && getIsle(x,y) == null) { + Bridge selectedBridge = potentialsBridges.get(getNearestBridge(e.getX(), e.getY())); int index = BridgeAlreadyExists(selectedBridge); @@ -316,7 +333,12 @@ public void mousePressed(MouseEvent e) { break; } } + + if(isIsleFull(selectedBridge.getIle1()) || isIsleFull(selectedBridge.getIle2())) pose = false; + + if (pose) { + bridges.add(selectedBridge); ((GrilleImpl) getGrille()).poserPont(selectedBridge.ile1, selectedBridge.ile2, 1); onNewAction(selectedBridge.ile1, selectedBridge.ile2, Action.UN_PONT); @@ -325,7 +347,7 @@ public void mousePressed(MouseEvent e) { Bridge currentBridge = bridges.get(index); // Le pont est déjà dans la liste, le rendre double ou le supprimer - if (currentBridge.n == 2) { + if (currentBridge.n == 2 || (isIsleFull(currentBridge.getIle1()) || isIsleFull(currentBridge.getIle2()))) { // Supprimer le pont onNewAction(selectedBridge.ile1, selectedBridge.ile2, Action.AUCUN_PONT); ((GrilleImpl) getGrille()).supprimerPont(selectedBridge.ile1, selectedBridge.ile2); From 1b222cad364a3efd773a748393277fe861205772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=A3lie=20*?= <44349276+tetelie@users.noreply.github.com> Date: Fri, 12 Apr 2024 15:46:47 +0200 Subject: [PATCH 23/31] Changement de couleur pour les ponts potentiels se chevauchants --- .../impl/gui/component/GameComponent.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java b/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java index 985791e..4427f8f 100644 --- a/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java +++ b/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java @@ -69,7 +69,10 @@ protected void paintComponent(Graphics g) { // Dessiner les ponts potentiels for (Bridge bridge : potentialsBridges) { - g2.setColor(DefaultTheme.INSTANCE.getPotentialBridgeColor()); + + Color color = isCrossing(bridge) ? new Color(237,0,16, 80) : DefaultTheme.INSTANCE.getPotentialBridgeColor(); + g2.setColor(color); + if (estHorizontal(bridge)) { g2.draw(new Line2D.Float(zeroX + cell_size * bridge.ile1.getX() + cell_size + bridgeSpacing, zeroY + cell_size * bridge.ile1.getY() + cell_size / 2, zeroX + cell_size * bridge.ile2.getX() - bridgeSpacing, zeroY + cell_size * bridge.ile1.getY() + cell_size / 2)); @@ -400,6 +403,19 @@ private boolean isCrossing(Bridge bridge1, Bridge bridge2) { return isCrossing(bridge1, bridge2, 2); } + private boolean isCrossing(Bridge bridge) + { + boolean cross = false; + for(Bridge b : bridges) + { + if(!b.equals(bridge)) + { + if(isCrossing(b,bridge)) cross = true; + } + } + return cross; + } + /** * Fonction retournant si 2 ponts se croisent * From 042e65348a526a36fa7482226d94e96b1a39b850 Mon Sep 17 00:00:00 2001 From: enimaloc Date: Fri, 12 Apr 2024 15:59:54 +0200 Subject: [PATCH 24/31] ajout de solution --- .../fr/hashimiste/impl/jeu/GrilleImpl.java | 9 +- src/main/resources/sql/startup.sql | 347 +++++++++++++++++- 2 files changed, 353 insertions(+), 3 deletions(-) diff --git a/src/main/java/fr/hashimiste/impl/jeu/GrilleImpl.java b/src/main/java/fr/hashimiste/impl/jeu/GrilleImpl.java index 2854e8e..18cedd9 100644 --- a/src/main/java/fr/hashimiste/impl/jeu/GrilleImpl.java +++ b/src/main/java/fr/hashimiste/impl/jeu/GrilleImpl.java @@ -205,22 +205,24 @@ public void rafraichirSauvegardes(Stockage stockage) { public boolean verification() { // TODO: a réadapter if (solution == null) { DevUtils.debug("No solution found for this map. Verifying with n of islands."); + boolean isComplete = true; for (Case[] ile : iles) { for (Case aCase : ile) { if (aCase instanceof Ile) { Ile ile1 = (Ile) aCase; if (!ile1.isComplete()) { DevUtils.debug("L'île en x = " + ile1.getX() + " et y = " + ile1.getY() + " n'est pas complète. {" + ile1 + "}"); - return false; + DevUtils.debug("ile1.getNbPont() = " + ile1.getNbPont()); + isComplete = false; } } } } + return isComplete; } else { DevUtils.debug("Solution found for this map. Verifying with solution."); return equals(solution); } - return true; } @Override @@ -367,6 +369,9 @@ public void chargerSauvegarde(Sauvegarde sauvegarde) { * @param stockage le stockage à utiliser pour charger les données. */ public void fetchSolution(Stockage stockage) { + if (id >= 1000) { + return; + } Sauvegarde sauvegarde = getSauvegardes(stockage) .stream() .filter(s -> s.getProfil().getId() == 1 && s.getNom().equals("Solution " + id)) diff --git a/src/main/resources/sql/startup.sql b/src/main/resources/sql/startup.sql index df74d14..341ef79 100644 --- a/src/main/resources/sql/startup.sql +++ b/src/main/resources/sql/startup.sql @@ -575,4 +575,349 @@ INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `actio INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880136644, 2, 76, 77, 2, 1712880135736); INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880137782, 2, 77, 78, 2, 1712880136644); INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712880137964, 2, 77, 78, 3, 1712880137782); -INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) VALUES (1, 'Solution 2', 1712880137964); \ No newline at end of file +INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) VALUES (1, 'Solution 2', 1712880137964); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) VALUES (1712923427849, 3, 0, 0, 0); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923430701,3,85,86,2,1712923427849); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923431616,3,85,92,2,1712923430701); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923439218,3,86,87,2,1712923431616); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923439352,3,86,87,3,1712923439218); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923440145,3,87,88,2,1712923439352); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923440312,3,87,88,3,1712923440145); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923442042,3,92,99,2,1712923440312); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923442231,3,92,99,3,1712923442042); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923443322,3,99,103,2,1712923442231); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923444212,3,103,104,2,1712923443322); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923444378,3,103,104,3,1712923444212); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923445723,3,100,104,2,1712923444378); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923445905,3,100,104,3,1712923445723); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923446893,3,100,101,2,1712923445905); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923447065,3,100,101,3,1712923446893); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923449338,3,95,100,2,1712923447065); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923450310,3,95,96,2,1712923449338); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923450481,3,95,96,3,1712923450310); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923456447,3,89,98,2,1712923450481); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923456641,3,89,98,3,1712923456447); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923457798,3,89,90,2,1712923456641); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923458797,3,90,91,2,1712923457798); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923458946,3,90,91,3,1712923458797); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923460278,3,90,96,2,1712923458946); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923460441,3,90,96,3,1712923460278); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923462183,3,96,101,2,1712923460441); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923462345,3,96,101,3,1712923462183); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923463848,3,101,105,2,1712923462345); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923465698,3,101,102,2,1712923463848); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923465890,3,101,102,3,1712923465698); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923468020,3,105,106,2,1712923465890); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923468578,3,105,106,3,1712923468020); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923469401,3,102,106,2,1712923468578); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923469601,3,102,106,3,1712923469401); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923470462,3,94,102,2,1712923469601); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923472577,3,93,94,2,1712923470462); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923472747,3,93,94,3,1712923472577); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923473727,3,96,97,2,1712923472747); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923473899,3,96,97,3,1712923473727); +INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) VALUES (1, 'Solution 3', 1712923473899); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) VALUES (1712924418125, 4, 0, 0, 0); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924419331,4,122,127,2,1712924418125); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924419941,4,114,122,2,1712924419331); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924420676,4,110,114,2,1712924419941); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924421493,4,109,110,2,1712924420676); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924422774,4,108,109,2,1712924421493); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924423863,4,107,108,2,1712924422774); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924424220,4,107,108,3,1712924423863); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924425017,4,107,115,2,1712924424220); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924427011,4,115,123,2,1712924425017); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924444756,4,123,124,2,1712924427011); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924447078,4,119,120,2,1712924444756); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924447341,4,119,120,3,1712924447078); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924449449,4,115,116,2,1712924447341); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924452129,4,116,117,2,1712924449449); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924453818,4,112,117,2,1712924452129); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924454786,4,111,112,2,1712924453818); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924456450,4,112,113,2,1712924454786); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924456782,4,112,113,3,1712924456450); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924459110,4,113,118,2,1712924456782); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924461284,4,118,126,2,1712924459110); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924463626,4,120,121,2,1712924461284); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924467898,4,125,126,2,1712924463626); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924469434,4,120,129,2,1712924467898); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924470338,4,128,129,2,1712924469434); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924471542,4,129,130,2,1712924470338); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924472519,4,126,130,2,1712924471542); +INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) VALUES (1, 'Solution 4', 1712924472519); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) VALUES (1712927821191, 5, 0, 0, 0); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927822422,5,134,135,2,1712927821191); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927823116,5,133,134,2,1712927822422); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927823732,5,132,133,2,1712927823116); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927824320,5,131,132,2,1712927823732); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927824839,5,131,140,2,1712927824320); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927825503,5,140,149,2,1712927824839); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927826416,5,149,158,2,1712927825503); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927827276,5,140,149,3,1712927826416); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927828657,5,140,141,2,1712927827276); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927831530,5,141,142,2,1712927828657); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927832425,5,142,143,2,1712927831530); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927832655,5,142,143,3,1712927832425); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927833513,5,143,151,2,1712927832655); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927834764,5,151,157,2,1712927833513); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927834958,5,151,157,3,1712927834764); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927836292,5,157,165,2,1712927834958); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927837216,5,164,165,2,1712927836292); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927837725,5,164,165,3,1712927837216); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927838802,5,163,164,2,1712927837725); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927840820,5,162,163,2,1712927838802); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927841085,5,162,163,3,1712927840820); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927843240,5,152,163,2,1712927841085); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927844044,5,155,162,2,1712927843240); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927845839,5,144,155,2,1712927844044); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927847813,5,146,159,2,1712927845839); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927849930,5,146,147,2,1712927847813); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927851838,5,142,147,2,1712927849930); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927853055,5,147,160,2,1712927851838); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927854444,5,147,148,2,1712927853055); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927855959,5,150,156,2,1712927854444); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927857084,5,148,153,2,1712927855959); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927861106,5,160,161,2,1712927857084); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927862465,5,156,157,2,1712927861106); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927879854,5,136,137,2,1712927862465); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927881469,5,137,138,2,1712927879854); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927881662,5,137,138,3,1712927881469); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927883344,5,138,139,2,1712927881662); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927885362,5,139,145,2,1712927883344); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927885550,5,139,145,3,1712927885362); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927886565,5,145,154,2,1712927885550); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927887517,5,154,166,2,1712927886565); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927887721,5,154,166,3,1712927887517); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712927888605,5,165,166,2,1712927887721); +INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) VALUES (1, 'Solution 5', 1712927888605); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) VALUES (1712925220160, 6, 0, 0, 0); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925222271,6,171,176,2,1712925220160); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925223336,6,176,187,2,1712925222271); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925224633,6,187,196,2,1712925223336); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925225465,6,196,197,2,1712925224633); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925226435,6,197,198,2,1712925225465); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925227706,6,198,199,2,1712925226435); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925227903,6,198,199,3,1712925227706); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925228810,6,199,200,2,1712925227903); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925229498,6,193,200,2,1712925228810); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925229705,6,193,200,3,1712925229498); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925230924,6,186,193,2,1712925229705); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925231491,6,179,186,2,1712925230924); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925231703,6,179,186,3,1712925231491); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925232667,6,170,179,2,1712925231703); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925233519,6,169,170,2,1712925232667); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925233704,6,169,170,3,1712925233519); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925234611,6,168,169,2,1712925233704); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925235320,6,167,168,2,1712925234611); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925235513,6,167,168,3,1712925235320); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925236638,6,167,172,2,1712925235513); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925238196,6,172,180,2,1712925236638); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925239629,6,180,190,2,1712925238196); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925240976,6,172,173,2,1712925239629); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925241152,6,172,173,3,1712925240976); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925246155,6,184,197,2,1712925241152); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925246313,6,184,197,3,1712925246155); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925247982,6,177,184,2,1712925246313); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925248410,6,184,185,2,1712925247982); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925251082,6,181,182,2,1712925248410); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925251756,6,174,182,2,1712925251082); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925253046,6,174,175,2,1712925251756); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925255062,6,175,183,2,1712925253046); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925256019,6,183,189,2,1712925255062); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925256257,6,183,189,3,1712925256019); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925258079,6,188,189,2,1712925256257); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925258298,6,188,189,3,1712925258079); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925260118,6,178,188,2,1712925258298); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925262634,6,191,192,2,1712925260118); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925263749,6,182,192,2,1712925262634); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925263937,6,182,192,3,1712925263749); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925264756,6,192,198,2,1712925263937); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925265354,6,192,198,3,1712925264756); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925267495,6,194,195,2,1712925265354); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925267828,6,194,195,3,1712925267495); +INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) VALUES (1, 'Solution 6', 1712925267828); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) VALUES (1712928017286, 7, 0, 0, 0); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928019436,7,201,202,2,1712928017286); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928020557,7,202,203,2,1712928019436); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928021870,7,203,204,2,1712928020557); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928022494,7,204,211,2,1712928021870); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928022652,7,204,211,3,1712928022494); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928023846,7,211,219,2,1712928022652); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928024584,7,219,227,2,1712928023846); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928025985,7,227,239,2,1712928024584); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928026592,7,238,239,2,1712928025985); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928029964,7,237,238,2,1712928026592); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928030761,7,236,237,2,1712928029964); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928031350,7,235,236,2,1712928030761); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928032011,7,228,235,2,1712928031350); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928033221,7,220,228,2,1712928032011); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928033681,7,212,220,2,1712928033221); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928034263,7,205,212,2,1712928033681); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928036174,7,205,206,2,1712928034263); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928038715,7,206,207,2,1712928036174); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928039496,7,207,208,2,1712928038715); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928041031,7,208,215,2,1712928039496); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928041927,7,215,223,2,1712928041031); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928042269,7,215,223,3,1712928041927); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928043247,7,223,234,2,1712928042269); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928047551,7,206,225,2,1712928043247); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928048005,7,206,225,3,1712928047551); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928051864,7,212,213,2,1712928048005); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928053944,7,213,221,2,1712928051864); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928054101,7,213,221,3,1712928053944); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928055970,7,225,232,2,1712928054101); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928057864,7,224,225,2,1712928055970); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928058640,7,216,224,2,1712928057864); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928061567,7,231,232,2,1712928058640); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928061750,7,231,232,3,1712928061567); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928063239,7,224,231,2,1712928061750); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928065749,7,232,233,2,1712928063239); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928067930,7,222,233,2,1712928065749); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928071079,7,217,230,2,1712928067930); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928073066,7,209,217,2,1712928071079); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928074600,7,209,210,2,1712928073066); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928077072,7,217,218,2,1712928074600); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928078342,7,214,215,2,1712928077072); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928080167,7,218,226,2,1712928078342); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928081403,7,226,238,2,1712928080167); +INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) VALUES (1, 'Solution 7', 1712928081403); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) VALUES (1712923967827, 8, 0, 0, 0); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923968877,8,271,272,2,1712923967827); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923969511,8,272,273,2,1712923968877); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923970597,8,273,274,2,1712923969511); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923971263,8,266,274,2,1712923970597); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923972128,8,262,266,2,1712923971263); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923972326,8,262,266,3,1712923972128); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923973410,8,250,262,2,1712923972326); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923974216,8,244,250,2,1712923973410); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923974437,8,244,250,3,1712923974216); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923975689,8,243,244,2,1712923974437); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923977105,8,242,243,2,1712923975689); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923977278,8,242,243,3,1712923977105); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923978298,8,241,242,2,1712923977278); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923979115,8,240,241,2,1712923978298); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923979302,8,240,241,3,1712923979115); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923980197,8,240,251,2,1712923979302); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923981531,8,251,259,2,1712923980197); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923982298,8,259,267,2,1712923981531); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923982908,8,267,268,2,1712923982298); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923983762,8,268,269,2,1712923982908); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923983928,8,268,269,3,1712923983762); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923985869,8,269,270,2,1712923983928); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923987208,8,263,270,2,1712923985869); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923987977,8,258,263,2,1712923987208); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923989852,8,248,258,2,1712923987977); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923991824,8,247,248,2,1712923989852); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923994079,8,246,247,2,1712923991824); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923994375,8,246,247,3,1712923994079); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923996304,8,245,246,2,1712923994375); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712923996599,8,245,246,3,1712923996304); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924001666,8,246,253,2,1712923996599); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924002571,8,249,256,2,1712924001666); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924004564,8,255,256,2,1712924002571); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924007872,8,257,258,2,1712924004564); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924010323,8,256,257,2,1712924007872); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924012439,8,257,265,2,1712924010323); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924013449,8,264,265,2,1712924012439); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924018132,8,253,254,2,1712924013449); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924018383,8,253,254,3,1712924018132); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924021659,8,251,252,2,1712924018383); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924023844,8,259,260,2,1712924021659); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924025869,8,260,261,2,1712924023844); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924026105,8,260,261,3,1712924025869); +INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) VALUES (1, 'Solution 8', 1712924026105); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924990289,9,0,0,0,0); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924994442,9,275,283,2,1712924990289); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924995273,9,275,276,2,1712924994442); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924996033,9,276,277,2,1712924995273); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924996898,9,277,278,2,1712924996033); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924998082,9,278,279,2,1712924996898); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924999093,9,279,288,2,1712924998082); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712924999892,9,288,294,2,1712924999093); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925001738,9,293,294,2,1712924999892); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925003156,9,293,298,2,1712925001738); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925003368,9,293,298,3,1712925003156); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925005069,9,298,306,2,1712925003368); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925005830,9,306,307,2,1712925005069); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925006528,9,307,308,2,1712925005830); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925007366,9,299,300,2,1712925006528); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925007876,9,299,307,2,1712925007366); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925008431,9,298,299,2,1712925007876); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925009733,9,292,300,2,1712925008431); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925009971,9,292,300,3,1712925009733); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925010802,9,282,292,2,1712925009971); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925016571,9,295,301,2,1712925010802); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925016721,9,295,301,3,1712925016571); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925017342,9,301,302,2,1712925016721); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925018659,9,302,303,2,1712925017342); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925020012,9,297,303,2,1712925018659); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925020179,9,297,303,3,1712925020012); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925021504,9,296,297,2,1712925020179); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925021737,9,296,297,3,1712925021504); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925023996,9,295,296,2,1712925021737); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925026905,9,290,297,2,1712925023996); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925028418,9,285,290,2,1712925026905); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925030230,9,289,290,2,1712925028418); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925031546,9,290,291,2,1712925030230); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925032863,9,287,288,2,1712925031546); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925034676,9,285,286,2,1712925032863); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925041825,9,277,285,2,1712925034676); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925043320,9,284,285,2,1712925041825); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925046119,9,280,281,2,1712925043320); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925047275,9,280,289,2,1712925046119); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925047729,9,280,289,3,1712925047275); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925050259,9,304,305,2,1712925047729); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712925050846,9,305,306,2,1712925050259); +INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) VALUES (1, 'Solution 9', 1712925050846); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`) VALUES (1712928699406,10,0,0,0); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928700752,10,313,318,2,1712928699406); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928701785,10,318,328,2,1712928700752); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928701952,10,318,328,3,1712928701785); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928703242,10,328,337,2,1712928701952); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928704427,10,337,338,2,1712928703242); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928705546,10,338,339,2,1712928704427); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928707073,10,339,340,2,1712928705546); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928708635,10,330,340,2,1712928707073); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928708832,10,330,340,3,1712928708635); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928711083,10,340,341,2,1712928708832); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928713037,10,331,341,2,1712928711083); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928718586,10,324,330,2,1712928713037); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928719206,10,323,324,2,1712928718586); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928719368,10,323,324,3,1712928719206); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928719851,10,323,329,2,1712928719368); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928720355,10,329,330,2,1712928719851); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928724436,10,342,343,2,1712928720355); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928724933,10,343,344,2,1712928724436); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928725105,10,343,344,3,1712928724933); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928725727,10,344,345,2,1712928725105); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928726784,10,345,346,2,1712928725727); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928727001,10,345,346,3,1712928726784); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928727801,10,336,346,2,1712928727001); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928728760,10,327,336,2,1712928727801); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928730433,10,326,327,2,1712928728760); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928731371,10,321,327,2,1712928730433); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928733592,10,326,335,2,1712928731371); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928735125,10,320,321,2,1712928733592); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928735836,10,314,320,2,1712928735125); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928736065,10,314,320,3,1712928735836); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928739095,10,312,321,2,1712928736065); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928739794,10,311,312,2,1712928739095); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928741422,10,311,317,2,1712928739794); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928741954,10,311,317,3,1712928741422); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928743649,10,316,317,2,1712928741954); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928746471,10,315,316,2,1712928743649); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928748507,10,315,325,2,1712928746471); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928754209,10,310,311,2,1712928748507); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928755450,10,309,310,2,1712928754209); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928755939,10,309,310,3,1712928755450); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928758467,10,309,322,2,1712928755939); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928760952,10,322,332,2,1712928758467); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928763242,10,332,333,2,1712928760952); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928764362,10,332,333,3,1712928763242); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928766931,10,333,334,2,1712928764362); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928769069,10,319,333,2,1712928766931); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928805396,10,322,332,3,1712928769069); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928807329,10,332,333,1,1712928805396); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928807661,10,332,333,2,1712928807329); +INSERT OR IGNORE INTO historique (`date`, `id_map`, `id_ile1`, `id_ile2`, `action`, `avant`) VALUES (1712928808875,10,319,333,3,1712928807661); +INSERT OR IGNORE INTO sauvegarde (id_profil, nom, reference) VALUES (1, 'Solution 10', 1712928808875); \ No newline at end of file From 002937a510822a6b60f22e0f921471a6e11572ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=A3lie=20*?= <44349276+tetelie@users.noreply.github.com> Date: Fri, 12 Apr 2024 16:16:47 +0200 Subject: [PATCH 25/31] =?UTF-8?q?suppression=20de=20l'affichage=20des=20po?= =?UTF-8?q?nts=20potentiels=20qui=20ne=20peuvent=20pas=20=C3=AAtre=20pos?= =?UTF-8?q?=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/gui/component/GameComponent.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java b/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java index 4427f8f..a7bf9e9 100644 --- a/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java +++ b/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java @@ -73,12 +73,15 @@ protected void paintComponent(Graphics g) { Color color = isCrossing(bridge) ? new Color(237,0,16, 80) : DefaultTheme.INSTANCE.getPotentialBridgeColor(); g2.setColor(color); - if (estHorizontal(bridge)) { - g2.draw(new Line2D.Float(zeroX + cell_size * bridge.ile1.getX() + cell_size + bridgeSpacing, zeroY + cell_size * bridge.ile1.getY() + cell_size / 2, - zeroX + cell_size * bridge.ile2.getX() - bridgeSpacing, zeroY + cell_size * bridge.ile1.getY() + cell_size / 2)); - } else { - g2.draw(new Line2D.Float(zeroX + cell_size * bridge.ile1.getX() + cell_size / 2, zeroY + cell_size * bridge.ile1.getY() + cell_size + bridgeSpacing, - zeroX + cell_size * bridge.ile2.getX() + cell_size / 2, zeroY + cell_size * bridge.ile2.getY() - bridgeSpacing)); + if(!isIsleFull(bridge.getIle1()) && !isIsleFull(bridge.getIle2())) { + + if (estHorizontal(bridge)) { + g2.draw(new Line2D.Float(zeroX + cell_size * bridge.ile1.getX() + cell_size + bridgeSpacing, zeroY + cell_size * bridge.ile1.getY() + cell_size / 2, + zeroX + cell_size * bridge.ile2.getX() - bridgeSpacing, zeroY + cell_size * bridge.ile1.getY() + cell_size / 2)); + } else { + g2.draw(new Line2D.Float(zeroX + cell_size * bridge.ile1.getX() + cell_size / 2, zeroY + cell_size * bridge.ile1.getY() + cell_size + bridgeSpacing, + zeroX + cell_size * bridge.ile2.getX() + cell_size / 2, zeroY + cell_size * bridge.ile2.getY() - bridgeSpacing)); + } } } From 4e884f34ca6820c97b4f6b3eed2f92d3a75ffa0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=A3lie=20*?= <44349276+tetelie@users.noreply.github.com> Date: Sun, 14 Apr 2024 11:04:37 +0200 Subject: [PATCH 26/31] =?UTF-8?q?R=C3=A8glage=20petit=20bug=20d'affichage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/fr/hashimiste/impl/gui/component/GameComponent.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java b/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java index a7bf9e9..c224714 100644 --- a/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java +++ b/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java @@ -288,6 +288,9 @@ public int getNearestBridge(int souris_x, int souris_y) { int x = (souris_x - zeroX) / i; int y = (souris_y - zeroY) / i; if (potentialsBridges.size() > 1 && getIsle(x, y) == null) { + if(isIsleFull(potentialsBridges.get(0).getIle1()) || isIsleFull(potentialsBridges.get(0).getIle2())) { + return 1; + } double sy = souris_y - (zeroY + y * factor); double quarter = factor / 4; //System.out.println("x: " + x + " y:" + y + " sx:" + souris_x + " sy" + (sy)); From 3aabb1e71d8c8d703be3de70d182a53840d4ad3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=A3lie=20*?= <44349276+tetelie@users.noreply.github.com> Date: Sun, 14 Apr 2024 11:07:03 +0200 Subject: [PATCH 27/31] Suppression des commentaires inutiles --- .../fr/hashimiste/impl/gui/component/GameComponent.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java b/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java index c224714..4b72a96 100644 --- a/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java +++ b/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java @@ -54,7 +54,6 @@ protected void paintComponent(Graphics g) { if (getGrille() == null) return; double factor = Math.min((getSize().getWidth() - 5) / getGrille().getDimension().width, (getSize().getHeight() - 5) / getGrille().getDimension().height); - //System.out.println("factor: " + factor); int zeroX = (int) ((getSize().width / 2d) - ((getGrille().getDimension().width * factor) / 2)); int zeroY = (int) ((getSize().height / 2d) - ((getGrille().getDimension().height * factor) / 2)); float cell_size = (this.getWidth() - zeroX - zeroX) / getGrille().getDimension().width; @@ -157,7 +156,6 @@ public void refreshBridge(int souris_x, int souris_y) { int y = (souris_y - zeroY) / i; Ile ile = getIsle(x, y); boolean isOnIsle = ile != null; - //System.out.println(isOnIsle); Ile ileOuest = checkNearIsle(Direction.OUEST, x, y); Ile ileEst = checkNearIsle(Direction.EST, x, y); @@ -293,13 +291,11 @@ public int getNearestBridge(int souris_x, int souris_y) { } double sy = souris_y - (zeroY + y * factor); double quarter = factor / 4; - //System.out.println("x: " + x + " y:" + y + " sx:" + souris_x + " sy" + (sy)); if (sy < quarter || sy > quarter * 3) { return 1; } else { return 0; } - //System.out.println(factor); } return 0; } @@ -374,8 +370,6 @@ public void mousePressed(MouseEvent e) { refreshBridge(e.getX(), e.getY()); repaint(); - //System.out.println("pb: " + potentialsBridges.size()); - //System.out.println("b: " + bridges.size()); } } From 28aa9dad9943ec612d2353e9e06ef4c50e578c58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=A3lie=20*?= <44349276+tetelie@users.noreply.github.com> Date: Sun, 14 Apr 2024 11:26:27 +0200 Subject: [PATCH 28/31] Doc + mise des variables en final --- .../impl/gui/component/GameComponent.java | 123 ++++++++++-------- 1 file changed, 67 insertions(+), 56 deletions(-) diff --git a/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java b/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java index 4b72a96..c5af04d 100644 --- a/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java +++ b/src/main/java/fr/hashimiste/impl/gui/component/GameComponent.java @@ -53,31 +53,38 @@ protected void paintComponent(Graphics g) { super.paintComponent(g); if (getGrille() == null) return; - double factor = Math.min((getSize().getWidth() - 5) / getGrille().getDimension().width, (getSize().getHeight() - 5) / getGrille().getDimension().height); - int zeroX = (int) ((getSize().width / 2d) - ((getGrille().getDimension().width * factor) / 2)); - int zeroY = (int) ((getSize().height / 2d) - ((getGrille().getDimension().height * factor) / 2)); - float cell_size = (this.getWidth() - zeroX - zeroX) / getGrille().getDimension().width; - Graphics2D g2 = (Graphics2D) g; - - float lineThickness = cell_size / 12; // Ajustez le dénominateur selon vos besoins + // calcul des constantes + final double factor = Math.min((getSize().getWidth() - 5) / getGrille().getDimension().width, (getSize().getHeight() - 5) / getGrille().getDimension().height); + final int zeroX = (int) ((getSize().width / 2d) - ((getGrille().getDimension().width * factor) / 2)); + final int zeroY = (int) ((getSize().height / 2d) - ((getGrille().getDimension().height * factor) / 2)); + final Graphics2D g2 = (Graphics2D) g; + final float cell_size = (float) factor; + float lineThickness = ((this.getWidth() - zeroX - zeroX) / getGrille().getDimension().width) / 12; + + // definition épaisseur d'un pont potentiel g2.setStroke(new BasicStroke(lineThickness * 4)); - cell_size = (float) factor; // Espacement entre les deux lignes d'un pont double int bridgeSpacing = (int) (cell_size / 12); // Dessiner les ponts potentiels + // for (Bridge bridge : potentialsBridges) { + // selection de la couleur du pont à dessiner en fonction de si il est posable ou non Color color = isCrossing(bridge) ? new Color(237,0,16, 80) : DefaultTheme.INSTANCE.getPotentialBridgeColor(); g2.setColor(color); + // Si les deux ils du pont ne sont pas pleines if(!isIsleFull(bridge.getIle1()) && !isIsleFull(bridge.getIle2())) { + // Si le pont est horizontal if (estHorizontal(bridge)) { + // dessin du pont g2.draw(new Line2D.Float(zeroX + cell_size * bridge.ile1.getX() + cell_size + bridgeSpacing, zeroY + cell_size * bridge.ile1.getY() + cell_size / 2, zeroX + cell_size * bridge.ile2.getX() - bridgeSpacing, zeroY + cell_size * bridge.ile1.getY() + cell_size / 2)); - } else { + } else { // sinon (vertical) + // dessin du pont g2.draw(new Line2D.Float(zeroX + cell_size * bridge.ile1.getX() + cell_size / 2, zeroY + cell_size * bridge.ile1.getY() + cell_size + bridgeSpacing, zeroX + cell_size * bridge.ile2.getX() + cell_size / 2, zeroY + cell_size * bridge.ile2.getY() - bridgeSpacing)); } @@ -85,42 +92,43 @@ protected void paintComponent(Graphics g) { } + // defibition épaisseur d'un pont reel g2.setStroke(new BasicStroke(lineThickness)); - + // definition de la couleur du pont g2.setColor(Color.BLACK); // Dessiner les ponts réels + // for (Bridge bridge : bridges) { // barrer les iles complètes - if(isIsleFull(bridge.getIle1())) + if(isIsleFull(bridge.getIle1())) // ile1 { g2.draw(new Line2D.Float(zeroX + cell_size * bridge.getIle1().getX()+cell_size/5, zeroY +cell_size *bridge.getIle1().getY()+cell_size/5, zeroX + cell_size * bridge.getIle1().getX()+cell_size-cell_size/5, zeroY +cell_size *bridge.getIle1().getY()+cell_size-cell_size/5)); } - if(isIsleFull(bridge.getIle2())) + if(isIsleFull(bridge.getIle2())) // ile2 { g2.draw(new Line2D.Float(zeroX + cell_size * bridge.getIle2().getX()+cell_size/5, zeroY +cell_size *bridge.getIle2().getY()+cell_size/5, zeroX + cell_size * bridge.getIle2().getX()+cell_size-cell_size/5, zeroY +cell_size *bridge.getIle2().getY()+cell_size-cell_size/5)); } - g2.setColor(Color.BLACK); if (bridge.n == 2) { // si pont double - if (estHorizontal(bridge)) { + if (estHorizontal(bridge)) { // dessin pont hozizontal g2.draw(new Line2D.Float(zeroX + cell_size * bridge.ile1.getX() + cell_size, zeroY + cell_size * bridge.ile1.getY() + cell_size / 2 - bridgeSpacing, zeroX + cell_size * bridge.ile2.getX(), zeroY + cell_size * bridge.ile1.getY() + cell_size / 2 - bridgeSpacing)); g2.draw(new Line2D.Float(zeroX + cell_size * bridge.ile1.getX() + cell_size, zeroY + cell_size * bridge.ile1.getY() + cell_size / 2 + bridgeSpacing, zeroX + cell_size * bridge.ile2.getX(), zeroY + cell_size * bridge.ile1.getY() + cell_size / 2 + bridgeSpacing)); - } else { + } else { // dessin pont vertical g2.draw(new Line2D.Float(zeroX + cell_size * bridge.ile1.getX() + cell_size / 2 - bridgeSpacing, zeroY + cell_size * bridge.ile1.getY() + cell_size, zeroX + cell_size * bridge.ile2.getX() + cell_size / 2 - bridgeSpacing, zeroY + cell_size * bridge.ile2.getY())); g2.draw(new Line2D.Float(zeroX + cell_size * bridge.ile1.getX() + cell_size / 2 + bridgeSpacing, zeroY + cell_size * bridge.ile1.getY() + cell_size, zeroX + cell_size * bridge.ile2.getX() + cell_size / 2 + bridgeSpacing, zeroY + cell_size * bridge.ile2.getY())); } } else { // sinon si pont simple - if (estHorizontal(bridge)) { + if (estHorizontal(bridge)) { // dessin pont hozizontal g2.draw(new Line2D.Float(zeroX + cell_size * bridge.ile1.getX() + cell_size, zeroY + cell_size * bridge.ile1.getY() + cell_size / 2, zeroX + cell_size * bridge.ile2.getX(), zeroY + cell_size * bridge.ile1.getY() + cell_size / 2)); - } else { + } else { // dessin pont vertical g2.draw(new Line2D.Float(zeroX + cell_size * bridge.ile1.getX() + cell_size / 2, zeroY + cell_size * bridge.ile1.getY() + cell_size, zeroX + cell_size * bridge.ile2.getX() + cell_size / 2, zeroY + cell_size * bridge.ile2.getY())); } @@ -145,24 +153,27 @@ public void mouseMoved(MouseEvent e) { * @param souris_y */ public void refreshBridge(int souris_x, int souris_y) { - potentialsBridges.clear(); - double factor = Math.min((getSize().getWidth() - 5) / getGrille().getDimension().width, (getSize().getHeight() - 5) / getGrille().getDimension().height); - int zeroX = (int) ((getSize().width / 2d) - ((getGrille().getDimension().width * factor) / 2)); - int zeroY = (int) ((getSize().height / 2d) - ((getGrille().getDimension().height * factor) / 2)); + potentialsBridges.clear(); // vide la liste des ponts potentiels + + // calcul des constantes + final double factor = Math.min((getSize().getWidth() - 5) / getGrille().getDimension().width, (getSize().getHeight() - 5) / getGrille().getDimension().height); + final int zeroX = (int) ((getSize().width / 2d) - ((getGrille().getDimension().width * factor) / 2)); + final int zeroY = (int) ((getSize().height / 2d) - ((getGrille().getDimension().height * factor) / 2)); + // Si la souris est dans le component if (souris_x >= zeroX && souris_y >= zeroY) { - int i = (this.getWidth() - zeroX - zeroX) / getGrille().getDimension().width; - int x = (souris_x - zeroX) / i; - int y = (souris_y - zeroY) / i; - Ile ile = getIsle(x, y); - boolean isOnIsle = ile != null; - - Ile ileOuest = checkNearIsle(Direction.OUEST, x, y); - Ile ileEst = checkNearIsle(Direction.EST, x, y); - Ile ileNord = checkNearIsle(Direction.NORD, x, y); - Ile ileSud = checkNearIsle(Direction.SUD, x, y); - - if (!isOnIsle) { + final int i = (this.getWidth() - zeroX - zeroX) / getGrille().getDimension().width; + final int x = (souris_x - zeroX) / i; // position x de la case survolé + final int y = (souris_y - zeroY) / i; // position y de la case survolé + final Ile ile = getIsle(x, y); + final boolean isOnIsle = ile != null; // Si la souris est sur une ile + + final Ile ileOuest = checkNearIsle(Direction.OUEST, x, y); + final Ile ileEst = checkNearIsle(Direction.EST, x, y); + final Ile ileNord = checkNearIsle(Direction.NORD, x, y); + final Ile ileSud = checkNearIsle(Direction.SUD, x, y); + + if (!isOnIsle) { // Si la souris n'est pas sur une ile if (ileOuest != null && ileEst != null) { potentialsBridges.add(new Bridge(ileOuest, ileEst, -1)); } @@ -279,18 +290,18 @@ public void mouseClicked(MouseEvent e) { * @return index */ public int getNearestBridge(int souris_x, int souris_y) { - double factor = Math.min((getSize().getWidth() - 5) / getGrille().getDimension().width, (getSize().getHeight() - 5) / getGrille().getDimension().height); - int zeroX = (int) ((getSize().width / 2d) - ((getGrille().getDimension().width * factor) / 2)); - int zeroY = (int) ((getSize().height / 2d) - ((getGrille().getDimension().height * factor) / 2)); - int i = (this.getWidth() - zeroX - zeroX) / getGrille().getDimension().width; - int x = (souris_x - zeroX) / i; - int y = (souris_y - zeroY) / i; + final double factor = Math.min((getSize().getWidth() - 5) / getGrille().getDimension().width, (getSize().getHeight() - 5) / getGrille().getDimension().height); + final int zeroX = (int) ((getSize().width / 2d) - ((getGrille().getDimension().width * factor) / 2)); + final int zeroY = (int) ((getSize().height / 2d) - ((getGrille().getDimension().height * factor) / 2)); + final int i = (this.getWidth() - zeroX - zeroX) / getGrille().getDimension().width; + final int x = (souris_x - zeroX) / i; + final int y = (souris_y - zeroY) / i; if (potentialsBridges.size() > 1 && getIsle(x, y) == null) { if(isIsleFull(potentialsBridges.get(0).getIle1()) || isIsleFull(potentialsBridges.get(0).getIle2())) { return 1; } - double sy = souris_y - (zeroY + y * factor); - double quarter = factor / 4; + final double sy = souris_y - (zeroY + y * factor); + final double quarter = factor / 4; if (sy < quarter || sy > quarter * 3) { return 1; } else { @@ -317,12 +328,12 @@ private boolean isIsleFull(Ile ile) */ @Override public void mousePressed(MouseEvent e) { - double factor = Math.min((getSize().getWidth() - 5) / getGrille().getDimension().width, (getSize().getHeight() - 5) / getGrille().getDimension().height); - int zeroX = (int) ((getSize().width / 2d) - ((getGrille().getDimension().width * factor) / 2)); - int zeroY = (int) ((getSize().height / 2d) - ((getGrille().getDimension().height * factor) / 2)); - int i = (this.getWidth() - zeroX - zeroX) / getGrille().getDimension().width; - int x = (e.getX() - zeroX) / i; - int y = (e.getY() - zeroY) / i; + final double factor = Math.min((getSize().getWidth() - 5) / getGrille().getDimension().width, (getSize().getHeight() - 5) / getGrille().getDimension().height); + final int zeroX = (int) ((getSize().width / 2d) - ((getGrille().getDimension().width * factor) / 2)); + final int zeroY = (int) ((getSize().height / 2d) - ((getGrille().getDimension().height * factor) / 2)); + final int i = (this.getWidth() - zeroX - zeroX) / getGrille().getDimension().width; + final int x = (e.getX() - zeroX) / i; + final int y = (e.getY() - zeroY) / i; // Si des ponts potentiels sont détectés if (isBridgeHover() && getIsle(x,y) == null) { @@ -383,7 +394,7 @@ public void mousePressed(MouseEvent e) { */ private int BridgeAlreadyExists(Bridge bridge) { for (int i = 0; i < bridges.size(); i++) { - Bridge b = bridges.get(i); + final Bridge b = bridges.get(i); if (bridge.ile1.getX() == b.ile1.getX() && bridge.ile1.getY() == b.ile1.getY() && bridge.ile2.getX() == b.ile2.getX() && bridge.ile2.getY() == b.ile2.getY()) { return i; // Retourner l'index si le pont existe déjà @@ -429,16 +440,16 @@ private boolean isCrossing(Bridge bridge1, Bridge bridge2, int recursion) { return false; } if (estHorizontal(bridge1) && !estHorizontal(bridge2)) { - int y1 = bridge1.getIle1().getY(); - int y2 = bridge1.getIle2().getY(); - int y3 = bridge2.getIle1().getY(); - int y4 = bridge2.getIle2().getY(); + final int y1 = bridge1.getIle1().getY(); + final int y2 = bridge1.getIle2().getY(); + final int y3 = bridge2.getIle1().getY(); + final int y4 = bridge2.getIle2().getY(); if (y1 < y4 && y2 > y3) { - int x1 = bridge1.getIle1().getX(); - int x2 = bridge1.getIle2().getX(); - int x3 = bridge2.getIle1().getX(); - int x4 = bridge2.getIle2().getX(); + final int x1 = bridge1.getIle1().getX(); + final int x2 = bridge1.getIle2().getX(); + final int x3 = bridge2.getIle1().getX(); + final int x4 = bridge2.getIle2().getX(); return x1 <= x4 && x2 >= x3; } } else { From f0651005251d9d23f73693358d069e94aeb08fdc Mon Sep 17 00:00:00 2001 From: enimaloc Date: Mon, 15 Apr 2024 10:37:52 +0200 Subject: [PATCH 29/31] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20gradle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 41dfb87..da1db5f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 1aef3221b0e01d8d5b8539ebd416460de9040a35 Mon Sep 17 00:00:00 2001 From: enimaloc Date: Mon, 15 Apr 2024 10:38:14 +0200 Subject: [PATCH 30/31] =?UTF-8?q?Suppression=20d=C3=A9pendance=20inutile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle.kts | 2 -- 1 file changed, 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index c6b4d39..0feb7c1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -19,8 +19,6 @@ repositories { dependencies { implementation("org.xerial:sqlite-jdbc:3.7.2") - implementation("ch.obermuhlner:jshell-scriptengine:1.1.0") - implementation("org.python:jython:2.7.2") testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.1") testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.1") From 1bb525169c9c9ebe25a925d6403cc57778e22112 Mon Sep 17 00:00:00 2001 From: enimaloc Date: Mon, 15 Apr 2024 10:38:36 +0200 Subject: [PATCH 31/31] Importation et configuration de la classe shadowJar --- build.gradle.kts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 0feb7c1..75f2982 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,7 +1,10 @@ +import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar + plugins { id("java") id("application") id("org.sonarqube") version "3.5.0.2730" + id("com.github.johnrengelman.shadow") version "8.1.1" } group = "fr.hashimiste" @@ -37,3 +40,9 @@ sonar { property("sonar.projectKey", "projet-gl2_Hashimiste_AY4o2rljbqkgiLWt9-aA") } } + +tasks.named("shadowJar") { + archiveBaseName.set("Grp1") + archiveClassifier.set("") + archiveVersion.set("") +} \ No newline at end of file