diff --git a/Avancee.odt b/Avancee.odt index fe3bb80..bb2abf1 100644 Binary files a/Avancee.odt and b/Avancee.odt differ diff --git a/Banniere.java b/Banniere.java index 7fdfe98..9a88fa2 100644 --- a/Banniere.java +++ b/Banniere.java @@ -5,10 +5,11 @@ public class Banniere extends JPanel { private FrameJeu fenetre; private FrameMenu menu; // Définition du constructeur - public Banniere(int mines, FrameJeu fenetre, FrameMenu menu) { + public Banniere(int mines, FrameJeu fenetre, FrameMenu menu, Dimension grilleSize) { super(); this.fenetre=fenetre; this.menu=menu; + this.setSize(grilleSize.width,grilleSize.height/8); // On défini un style à la bannière this.setBackground(new Color(0, 236, 96)); diff --git a/Case.java b/Case.java index 9f3d9af..16ebdbc 100644 --- a/Case.java +++ b/Case.java @@ -123,6 +123,18 @@ public class Case extends JPanel { return this.grille.getEnJeu(); } - // TODO : Override toString() pour avoir 3 bits désignants l'état de la case - // + @Override + public String toString(){ + int value=0; + if (this.minee){ + value+=1; + } + if (this.reperee){ + value+=2; + } + if (this.visible){ + value+=4; + } + return Integer.toString(value); + } } diff --git a/DiagrammeDeClasses.mdj b/DiagrammeDeClasses.mdj new file mode 100644 index 0000000..d56db0f --- /dev/null +++ b/DiagrammeDeClasses.mdj @@ -0,0 +1,2599 @@ +{ + "_type": "Project", + "_id": "AAAAAAFF+h6SjaM2Hec=", + "name": "Untitled", + "ownedElements": [ + { + "_type": "UMLModel", + "_id": "AAAAAAFF+qBWK6M3Z8Y=", + "_parent": { + "$ref": "AAAAAAFF+h6SjaM2Hec=" + }, + "name": "Model", + "ownedElements": [ + { + "_type": "UMLClassDiagram", + "_id": "AAAAAAFF+qBtyKM79qY=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "Main", + "defaultDiagram": true, + "ownedViews": [ + { + "_type": "UMLClassView", + "_id": "AAAAAAGA9Y6xAFXFNX0=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGA9Y6w/1XDIPE=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGA9Y6xAVXGaSc=", + "_parent": { + "$ref": "AAAAAAGA9Y6xAFXFNX0=" + }, + "model": { + "$ref": "AAAAAAGA9Y6w/1XDIPE=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGA9Y6xAVXHYww=", + "_parent": { + "$ref": "AAAAAAGA9Y6xAVXGaSc=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -256, + "top": -352, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9Y6xAVXIyOc=", + "_parent": { + "$ref": "AAAAAAGA9Y6xAVXGaSc=" + }, + "font": "Arial;13;1", + "left": 21, + "top": 23, + "width": 63, + "height": 13, + "text": "Main" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9Y6xAVXJMPs=", + "_parent": { + "$ref": "AAAAAAGA9Y6xAVXGaSc=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -256, + "top": -352, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9Y6xAVXKDGI=", + "_parent": { + "$ref": "AAAAAAGA9Y6xAVXGaSc=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -256, + "top": -352, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 16, + "top": 16, + "width": 73, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGA9Y6xAVXHYww=" + }, + "nameLabel": { + "$ref": "AAAAAAGA9Y6xAVXIyOc=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGA9Y6xAVXJMPs=" + }, + "propertyLabel": { + "$ref": "AAAAAAGA9Y6xAVXKDGI=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGA9Y6xAVXLR8A=", + "_parent": { + "$ref": "AAAAAAGA9Y6xAFXFNX0=" + }, + "model": { + "$ref": "AAAAAAGA9Y6w/1XDIPE=" + }, + "font": "Arial;13;0", + "left": 16, + "top": 41, + "width": 73, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGA9Y6xAVXManA=", + "_parent": { + "$ref": "AAAAAAGA9Y6xAFXFNX0=" + }, + "model": { + "$ref": "AAAAAAGA9Y6w/1XDIPE=" + }, + "font": "Arial;13;0", + "left": 16, + "top": 51, + "width": 73, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGA9Y6xAlXNFJo=", + "_parent": { + "$ref": "AAAAAAGA9Y6xAFXFNX0=" + }, + "model": { + "$ref": "AAAAAAGA9Y6w/1XDIPE=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -128, + "top": -176, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGA9Y6xAlXOR+8=", + "_parent": { + "$ref": "AAAAAAGA9Y6xAFXFNX0=" + }, + "model": { + "$ref": "AAAAAAGA9Y6w/1XDIPE=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -128, + "top": -176, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 16, + "top": 16, + "width": 73, + "height": 73, + "nameCompartment": { + "$ref": "AAAAAAGA9Y6xAVXGaSc=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGA9Y6xAVXLR8A=" + }, + "operationCompartment": { + "$ref": "AAAAAAGA9Y6xAVXManA=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGA9Y6xAlXNFJo=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGA9Y6xAlXOR+8=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGA9Y8G0FXx4bg=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGA9Y8G0FXv3rA=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGA9Y8G0FXyfNE=", + "_parent": { + "$ref": "AAAAAAGA9Y8G0FXx4bg=" + }, + "model": { + "$ref": "AAAAAAGA9Y8G0FXv3rA=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGA9Y8G0VXziCA=", + "_parent": { + "$ref": "AAAAAAGA9Y8G0FXyfNE=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -224, + "top": -176, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9Y8G0VX0Yx4=", + "_parent": { + "$ref": "AAAAAAGA9Y8G0FXyfNE=" + }, + "font": "Arial;13;1", + "left": 165, + "top": 39, + "width": 118, + "height": 13, + "text": "FrameMenu" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9Y8G0VX1RiM=", + "_parent": { + "$ref": "AAAAAAGA9Y8G0FXyfNE=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -224, + "top": -176, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9Y8G0VX2O3Q=", + "_parent": { + "$ref": "AAAAAAGA9Y8G0FXyfNE=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -224, + "top": -176, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 160, + "top": 32, + "width": 128, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGA9Y8G0VXziCA=" + }, + "nameLabel": { + "$ref": "AAAAAAGA9Y8G0VX0Yx4=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGA9Y8G0VX1RiM=" + }, + "propertyLabel": { + "$ref": "AAAAAAGA9Y8G0VX2O3Q=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGA9Y8G0VX3RvE=", + "_parent": { + "$ref": "AAAAAAGA9Y8G0FXx4bg=" + }, + "model": { + "$ref": "AAAAAAGA9Y8G0FXv3rA=" + }, + "font": "Arial;13;0", + "left": 160, + "top": 57, + "width": 128, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGA9Y8G0VX4WKg=", + "_parent": { + "$ref": "AAAAAAGA9Y8G0FXx4bg=" + }, + "model": { + "$ref": "AAAAAAGA9Y8G0FXv3rA=" + }, + "font": "Arial;13;0", + "left": 160, + "top": 67, + "width": 128, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGA9Y8G0VX597E=", + "_parent": { + "$ref": "AAAAAAGA9Y8G0FXx4bg=" + }, + "model": { + "$ref": "AAAAAAGA9Y8G0FXv3rA=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -112, + "top": -88, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGA9Y8G0VX6Fwc=", + "_parent": { + "$ref": "AAAAAAGA9Y8G0FXx4bg=" + }, + "model": { + "$ref": "AAAAAAGA9Y8G0FXv3rA=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -112, + "top": -88, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 160, + "top": 32, + "width": 128, + "height": 88, + "nameCompartment": { + "$ref": "AAAAAAGA9Y8G0FXyfNE=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGA9Y8G0VX3RvE=" + }, + "operationCompartment": { + "$ref": "AAAAAAGA9Y8G0VX4WKg=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGA9Y8G0VX597E=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGA9Y8G0VX6Fwc=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGA9Y8nw1Ybn/U=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGA9Y8nw1YZH20=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGA9Y8nw1Ycf+Y=", + "_parent": { + "$ref": "AAAAAAGA9Y8nw1Ybn/U=" + }, + "model": { + "$ref": "AAAAAAGA9Y8nw1YZH20=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGA9Y8nxFYdF6g=", + "_parent": { + "$ref": "AAAAAAGA9Y8nw1Ycf+Y=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 960, + "top": -48, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9Y8nxFYegk0=", + "_parent": { + "$ref": "AAAAAAGA9Y8nw1Ycf+Y=" + }, + "font": "Arial;13;1", + "left": 549, + "top": 239, + "width": 126, + "height": 13, + "text": "FrameJeu" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9Y8nxFYf3eI=", + "_parent": { + "$ref": "AAAAAAGA9Y8nw1Ycf+Y=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 960, + "top": -48, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9Y8nxFYglz0=", + "_parent": { + "$ref": "AAAAAAGA9Y8nw1Ycf+Y=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 960, + "top": -48, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 544, + "top": 232, + "width": 136, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGA9Y8nxFYdF6g=" + }, + "nameLabel": { + "$ref": "AAAAAAGA9Y8nxFYegk0=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGA9Y8nxFYf3eI=" + }, + "propertyLabel": { + "$ref": "AAAAAAGA9Y8nxFYglz0=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGA9Y8nxFYhmXE=", + "_parent": { + "$ref": "AAAAAAGA9Y8nw1Ybn/U=" + }, + "model": { + "$ref": "AAAAAAGA9Y8nw1YZH20=" + }, + "font": "Arial;13;0", + "left": 544, + "top": 257, + "width": 136, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGA9Y8nxFYiQfs=", + "_parent": { + "$ref": "AAAAAAGA9Y8nw1Ybn/U=" + }, + "model": { + "$ref": "AAAAAAGA9Y8nw1YZH20=" + }, + "font": "Arial;13;0", + "left": 544, + "top": 267, + "width": 136, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGA9Y8nxFYjM64=", + "_parent": { + "$ref": "AAAAAAGA9Y8nw1Ybn/U=" + }, + "model": { + "$ref": "AAAAAAGA9Y8nw1YZH20=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 480, + "top": -24, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGA9Y8nxFYkdNg=", + "_parent": { + "$ref": "AAAAAAGA9Y8nw1Ybn/U=" + }, + "model": { + "$ref": "AAAAAAGA9Y8nw1YZH20=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 480, + "top": -24, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 544, + "top": 232, + "width": 136, + "height": 80, + "nameCompartment": { + "$ref": "AAAAAAGA9Y8nw1Ycf+Y=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGA9Y8nxFYhmXE=" + }, + "operationCompartment": { + "$ref": "AAAAAAGA9Y8nxFYiQfs=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGA9Y8nxFYjM64=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGA9Y8nxFYkdNg=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGA9Y9fkFZFvZo=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGA9Y9fkFZDbPY=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGA9Y9fkFZGZyM=", + "_parent": { + "$ref": "AAAAAAGA9Y9fkFZFvZo=" + }, + "model": { + "$ref": "AAAAAAGA9Y9fkFZDbPY=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGA9Y9fkFZHSdA=", + "_parent": { + "$ref": "AAAAAAGA9Y9fkFZGZyM=" + }, + "visible": false, + "font": "Arial;13;0", + "top": -368, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9Y9fkFZIyDw=", + "_parent": { + "$ref": "AAAAAAGA9Y9fkFZGZyM=" + }, + "font": "Arial;13;1", + "left": 237, + "top": 175, + "width": 151, + "height": 13, + "text": "NewGameListener" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9Y9fkFZJxz4=", + "_parent": { + "$ref": "AAAAAAGA9Y9fkFZGZyM=" + }, + "visible": false, + "font": "Arial;13;0", + "top": -368, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9Y9fkFZKb24=", + "_parent": { + "$ref": "AAAAAAGA9Y9fkFZGZyM=" + }, + "visible": false, + "font": "Arial;13;0", + "top": -368, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 232, + "top": 168, + "width": 161, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGA9Y9fkFZHSdA=" + }, + "nameLabel": { + "$ref": "AAAAAAGA9Y9fkFZIyDw=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGA9Y9fkFZJxz4=" + }, + "propertyLabel": { + "$ref": "AAAAAAGA9Y9fkFZKb24=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGA9Y9fkFZLzik=", + "_parent": { + "$ref": "AAAAAAGA9Y9fkFZFvZo=" + }, + "model": { + "$ref": "AAAAAAGA9Y9fkFZDbPY=" + }, + "font": "Arial;13;0", + "left": 232, + "top": 193, + "width": 161, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGA9Y9fkFZMbjc=", + "_parent": { + "$ref": "AAAAAAGA9Y9fkFZFvZo=" + }, + "model": { + "$ref": "AAAAAAGA9Y9fkFZDbPY=" + }, + "font": "Arial;13;0", + "left": 232, + "top": 203, + "width": 161, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGA9Y9fkFZN96o=", + "_parent": { + "$ref": "AAAAAAGA9Y9fkFZFvZo=" + }, + "model": { + "$ref": "AAAAAAGA9Y9fkFZDbPY=" + }, + "visible": false, + "font": "Arial;13;0", + "top": -184, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGA9Y9fkFZOpsc=", + "_parent": { + "$ref": "AAAAAAGA9Y9fkFZFvZo=" + }, + "model": { + "$ref": "AAAAAAGA9Y9fkFZDbPY=" + }, + "visible": false, + "font": "Arial;13;0", + "top": -184, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 232, + "top": 168, + "width": 161, + "height": 121, + "nameCompartment": { + "$ref": "AAAAAAGA9Y9fkFZGZyM=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGA9Y9fkFZLzik=" + }, + "operationCompartment": { + "$ref": "AAAAAAGA9Y9fkFZMbjc=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGA9Y9fkFZN96o=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGA9Y9fkFZOpsc=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGA9ZBS91Z3B0s=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGA9ZBS9lZ1epg=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGA9ZBS91Z4Grk=", + "_parent": { + "$ref": "AAAAAAGA9ZBS91Z3B0s=" + }, + "model": { + "$ref": "AAAAAAGA9ZBS9lZ1epg=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZBS91Z5mtQ=", + "_parent": { + "$ref": "AAAAAAGA9ZBS91Z4Grk=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 368, + "top": 48, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZBS91Z63YQ=", + "_parent": { + "$ref": "AAAAAAGA9ZBS91Z4Grk=" + }, + "font": "Arial;13;1", + "left": 397, + "top": 383, + "width": 159, + "height": 13, + "text": "Grille" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZBS91Z7Hjg=", + "_parent": { + "$ref": "AAAAAAGA9ZBS91Z4Grk=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 368, + "top": 48, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZBS91Z8dDM=", + "_parent": { + "$ref": "AAAAAAGA9ZBS91Z4Grk=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 368, + "top": 48, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 392, + "top": 376, + "width": 169, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGA9ZBS91Z5mtQ=" + }, + "nameLabel": { + "$ref": "AAAAAAGA9ZBS91Z63YQ=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGA9ZBS91Z7Hjg=" + }, + "propertyLabel": { + "$ref": "AAAAAAGA9ZBS91Z8dDM=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGA9ZBS91Z9JH8=", + "_parent": { + "$ref": "AAAAAAGA9ZBS91Z3B0s=" + }, + "model": { + "$ref": "AAAAAAGA9ZBS9lZ1epg=" + }, + "font": "Arial;13;0", + "left": 392, + "top": 401, + "width": 169, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGA9ZBS91Z+G4Y=", + "_parent": { + "$ref": "AAAAAAGA9ZBS91Z3B0s=" + }, + "model": { + "$ref": "AAAAAAGA9ZBS9lZ1epg=" + }, + "font": "Arial;13;0", + "left": 392, + "top": 411, + "width": 169, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGA9ZBS91Z/T0s=", + "_parent": { + "$ref": "AAAAAAGA9ZBS91Z3B0s=" + }, + "model": { + "$ref": "AAAAAAGA9ZBS9lZ1epg=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 184, + "top": 24, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGA9ZBS91aAYTw=", + "_parent": { + "$ref": "AAAAAAGA9ZBS91Z3B0s=" + }, + "model": { + "$ref": "AAAAAAGA9ZBS9lZ1epg=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 184, + "top": 24, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 392, + "top": 376, + "width": 169, + "height": 161, + "nameCompartment": { + "$ref": "AAAAAAGA9ZBS91Z4Grk=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGA9ZBS91Z9JH8=" + }, + "operationCompartment": { + "$ref": "AAAAAAGA9ZBS91Z+G4Y=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGA9ZBS91Z/T0s=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGA9ZBS91aAYTw=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGA9ZCHQlajb9A=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGA9ZCHQlahzws=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGA9ZCHQlak/ro=", + "_parent": { + "$ref": "AAAAAAGA9ZCHQlajb9A=" + }, + "model": { + "$ref": "AAAAAAGA9ZCHQlahzws=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZCHQlaljdA=", + "_parent": { + "$ref": "AAAAAAGA9ZCHQlak/ro=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 256, + "top": -160, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZCHQlamF9o=", + "_parent": { + "$ref": "AAAAAAGA9ZCHQlak/ro=" + }, + "font": "Arial;13;1", + "left": 197, + "top": 367, + "width": 127, + "height": 13, + "text": "Banniere" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZCHQlanjVM=", + "_parent": { + "$ref": "AAAAAAGA9ZCHQlak/ro=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 256, + "top": -160, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZCHQlaob+c=", + "_parent": { + "$ref": "AAAAAAGA9ZCHQlak/ro=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 256, + "top": -160, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 192, + "top": 360, + "width": 137, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGA9ZCHQlaljdA=" + }, + "nameLabel": { + "$ref": "AAAAAAGA9ZCHQlamF9o=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGA9ZCHQlanjVM=" + }, + "propertyLabel": { + "$ref": "AAAAAAGA9ZCHQlaob+c=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGA9ZCHQlape/0=", + "_parent": { + "$ref": "AAAAAAGA9ZCHQlajb9A=" + }, + "model": { + "$ref": "AAAAAAGA9ZCHQlahzws=" + }, + "font": "Arial;13;0", + "left": 192, + "top": 385, + "width": 137, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGA9ZCHQlaqu2Q=", + "_parent": { + "$ref": "AAAAAAGA9ZCHQlajb9A=" + }, + "model": { + "$ref": "AAAAAAGA9ZCHQlahzws=" + }, + "font": "Arial;13;0", + "left": 192, + "top": 395, + "width": 137, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGA9ZCHQlarJNQ=", + "_parent": { + "$ref": "AAAAAAGA9ZCHQlajb9A=" + }, + "model": { + "$ref": "AAAAAAGA9ZCHQlahzws=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 128, + "top": -80, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGA9ZCHQlasSmQ=", + "_parent": { + "$ref": "AAAAAAGA9ZCHQlajb9A=" + }, + "model": { + "$ref": "AAAAAAGA9ZCHQlahzws=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 128, + "top": -80, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 192, + "top": 360, + "width": 137, + "height": 121, + "nameCompartment": { + "$ref": "AAAAAAGA9ZCHQlak/ro=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGA9ZCHQlape/0=" + }, + "operationCompartment": { + "$ref": "AAAAAAGA9ZCHQlaqu2Q=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGA9ZCHQlarJNQ=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGA9ZCHQlasSmQ=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGA9ZC20VbPeOg=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGA9ZC20VbNoms=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGA9ZC20VbQie0=", + "_parent": { + "$ref": "AAAAAAGA9ZC20VbPeOg=" + }, + "model": { + "$ref": "AAAAAAGA9ZC20VbNoms=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZC20VbR1b4=", + "_parent": { + "$ref": "AAAAAAGA9ZC20VbQie0=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 816, + "top": -128, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZC20VbSqRw=", + "_parent": { + "$ref": "AAAAAAGA9ZC20VbQie0=" + }, + "font": "Arial;13;1", + "left": 613, + "top": 383, + "width": 118, + "height": 13, + "text": "Case" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZC20VbTrdc=", + "_parent": { + "$ref": "AAAAAAGA9ZC20VbQie0=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 816, + "top": -128, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZC20VbUEuI=", + "_parent": { + "$ref": "AAAAAAGA9ZC20VbQie0=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 816, + "top": -128, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 608, + "top": 376, + "width": 128, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGA9ZC20VbR1b4=" + }, + "nameLabel": { + "$ref": "AAAAAAGA9ZC20VbSqRw=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGA9ZC20VbTrdc=" + }, + "propertyLabel": { + "$ref": "AAAAAAGA9ZC20VbUEuI=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGA9ZC20VbVSXo=", + "_parent": { + "$ref": "AAAAAAGA9ZC20VbPeOg=" + }, + "model": { + "$ref": "AAAAAAGA9ZC20VbNoms=" + }, + "font": "Arial;13;0", + "left": 608, + "top": 401, + "width": 128, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGA9ZC20VbWVQE=", + "_parent": { + "$ref": "AAAAAAGA9ZC20VbPeOg=" + }, + "model": { + "$ref": "AAAAAAGA9ZC20VbNoms=" + }, + "font": "Arial;13;0", + "left": 608, + "top": 411, + "width": 128, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGA9ZC20VbXynY=", + "_parent": { + "$ref": "AAAAAAGA9ZC20VbPeOg=" + }, + "model": { + "$ref": "AAAAAAGA9ZC20VbNoms=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 408, + "top": -64, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGA9ZC20VbYzQA=", + "_parent": { + "$ref": "AAAAAAGA9ZC20VbPeOg=" + }, + "model": { + "$ref": "AAAAAAGA9ZC20VbNoms=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 408, + "top": -64, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 608, + "top": 376, + "width": 128, + "height": 96, + "nameCompartment": { + "$ref": "AAAAAAGA9ZC20VbQie0=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGA9ZC20VbVSXo=" + }, + "operationCompartment": { + "$ref": "AAAAAAGA9ZC20VbWVQE=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGA9ZC20VbXynY=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGA9ZC20VbYzQA=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGA9ZFcgFcFUGU=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGA9ZFcf1cDd+Q=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGA9ZFcgFcGbrE=", + "_parent": { + "$ref": "AAAAAAGA9ZFcgFcFUGU=" + }, + "model": { + "$ref": "AAAAAAGA9ZFcf1cDd+Q=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZFcgFcHfLk=", + "_parent": { + "$ref": "AAAAAAGA9ZFcgFcGbrE=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 64, + "top": 224, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZFcgFcIlRI=", + "_parent": { + "$ref": "AAAAAAGA9ZFcgFcGbrE=" + }, + "font": "Arial;13;1", + "left": 61, + "top": 351, + "width": 78, + "height": 13, + "text": "Fin" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZFcgFcJ60c=", + "_parent": { + "$ref": "AAAAAAGA9ZFcgFcGbrE=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 64, + "top": 224, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZFcgFcKyIE=", + "_parent": { + "$ref": "AAAAAAGA9ZFcgFcGbrE=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 64, + "top": 224, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 56, + "top": 344, + "width": 88, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGA9ZFcgFcHfLk=" + }, + "nameLabel": { + "$ref": "AAAAAAGA9ZFcgFcIlRI=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGA9ZFcgFcJ60c=" + }, + "propertyLabel": { + "$ref": "AAAAAAGA9ZFcgFcKyIE=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGA9ZFcgVcLhak=", + "_parent": { + "$ref": "AAAAAAGA9ZFcgFcFUGU=" + }, + "model": { + "$ref": "AAAAAAGA9ZFcf1cDd+Q=" + }, + "font": "Arial;13;0", + "left": 56, + "top": 369, + "width": 88, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGA9ZFcgVcMNKM=", + "_parent": { + "$ref": "AAAAAAGA9ZFcgFcFUGU=" + }, + "model": { + "$ref": "AAAAAAGA9ZFcf1cDd+Q=" + }, + "font": "Arial;13;0", + "left": 56, + "top": 379, + "width": 88, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGA9ZFcgVcNtD8=", + "_parent": { + "$ref": "AAAAAAGA9ZFcgFcFUGU=" + }, + "model": { + "$ref": "AAAAAAGA9ZFcf1cDd+Q=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 32, + "top": 112, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGA9ZFcgVcOTuE=", + "_parent": { + "$ref": "AAAAAAGA9ZFcgFcFUGU=" + }, + "model": { + "$ref": "AAAAAAGA9ZFcf1cDd+Q=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 32, + "top": 112, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 56, + "top": 344, + "width": 88, + "height": 72, + "nameCompartment": { + "$ref": "AAAAAAGA9ZFcgFcGbrE=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGA9ZFcgVcLhak=" + }, + "operationCompartment": { + "$ref": "AAAAAAGA9ZFcgVcMNKM=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGA9ZFcgVcNtD8=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGA9ZFcgVcOTuE=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGA9ZG/ylcvQi0=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGA9ZG/ylctz5M=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGA9ZG/ylcwRfY=", + "_parent": { + "$ref": "AAAAAAGA9ZG/ylcvQi0=" + }, + "model": { + "$ref": "AAAAAAGA9ZG/ylctz5M=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZG/ylcxo7c=", + "_parent": { + "$ref": "AAAAAAGA9ZG/ylcwRfY=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 848, + "top": -304, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZG/ylcyXZk=", + "_parent": { + "$ref": "AAAAAAGA9ZG/ylcwRfY=" + }, + "font": "Arial;13;1", + "left": 821, + "top": 311, + "width": 118, + "height": 13, + "text": "ListenerCase" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZG/y1czAsM=", + "_parent": { + "$ref": "AAAAAAGA9ZG/ylcwRfY=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 848, + "top": -304, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZG/y1c0QoQ=", + "_parent": { + "$ref": "AAAAAAGA9ZG/ylcwRfY=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 848, + "top": -304, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 816, + "top": 304, + "width": 128, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGA9ZG/ylcxo7c=" + }, + "nameLabel": { + "$ref": "AAAAAAGA9ZG/ylcyXZk=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGA9ZG/y1czAsM=" + }, + "propertyLabel": { + "$ref": "AAAAAAGA9ZG/y1c0QoQ=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGA9ZG/y1c1f/c=", + "_parent": { + "$ref": "AAAAAAGA9ZG/ylcvQi0=" + }, + "model": { + "$ref": "AAAAAAGA9ZG/ylctz5M=" + }, + "font": "Arial;13;0", + "left": 816, + "top": 329, + "width": 128, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGA9ZG/y1c2P0c=", + "_parent": { + "$ref": "AAAAAAGA9ZG/ylcvQi0=" + }, + "model": { + "$ref": "AAAAAAGA9ZG/ylctz5M=" + }, + "font": "Arial;13;0", + "left": 816, + "top": 339, + "width": 128, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGA9ZG/y1c3+jw=", + "_parent": { + "$ref": "AAAAAAGA9ZG/ylcvQi0=" + }, + "model": { + "$ref": "AAAAAAGA9ZG/ylctz5M=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 424, + "top": -152, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGA9ZG/y1c4chI=", + "_parent": { + "$ref": "AAAAAAGA9ZG/ylcvQi0=" + }, + "model": { + "$ref": "AAAAAAGA9ZG/ylctz5M=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 424, + "top": -152, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 816, + "top": 304, + "width": 128, + "height": 104, + "nameCompartment": { + "$ref": "AAAAAAGA9ZG/ylcwRfY=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGA9ZG/y1c1f/c=" + }, + "operationCompartment": { + "$ref": "AAAAAAGA9ZG/y1c2P0c=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGA9ZG/y1c3+jw=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGA9ZG/y1c4chI=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGA9ZJWYVdbylM=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGA9ZJWYFdZQxg=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGA9ZJWYVdcaco=", + "_parent": { + "$ref": "AAAAAAGA9ZJWYVdbylM=" + }, + "model": { + "$ref": "AAAAAAGA9ZJWYFdZQxg=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZJWYVddFlk=", + "_parent": { + "$ref": "AAAAAAGA9ZJWYVdcaco=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 560, + "top": -64, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZJWYVde4fU=", + "_parent": { + "$ref": "AAAAAAGA9ZJWYVdcaco=" + }, + "font": "Arial;13;1", + "left": 789, + "top": 471, + "width": 118, + "height": 13, + "text": "Etoile" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZJWYVdf68M=", + "_parent": { + "$ref": "AAAAAAGA9ZJWYVdcaco=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 560, + "top": -64, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZJWYVdg7lk=", + "_parent": { + "$ref": "AAAAAAGA9ZJWYVdcaco=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 560, + "top": -64, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 784, + "top": 464, + "width": 128, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGA9ZJWYVddFlk=" + }, + "nameLabel": { + "$ref": "AAAAAAGA9ZJWYVde4fU=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGA9ZJWYVdf68M=" + }, + "propertyLabel": { + "$ref": "AAAAAAGA9ZJWYVdg7lk=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGA9ZJWYVdhlw8=", + "_parent": { + "$ref": "AAAAAAGA9ZJWYVdbylM=" + }, + "model": { + "$ref": "AAAAAAGA9ZJWYFdZQxg=" + }, + "font": "Arial;13;0", + "left": 784, + "top": 489, + "width": 128, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGA9ZJWYVdismk=", + "_parent": { + "$ref": "AAAAAAGA9ZJWYVdbylM=" + }, + "model": { + "$ref": "AAAAAAGA9ZJWYFdZQxg=" + }, + "font": "Arial;13;0", + "left": 784, + "top": 499, + "width": 128, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGA9ZJWYVdjc7A=", + "_parent": { + "$ref": "AAAAAAGA9ZJWYVdbylM=" + }, + "model": { + "$ref": "AAAAAAGA9ZJWYFdZQxg=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 280, + "top": -32, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGA9ZJWYVdkSog=", + "_parent": { + "$ref": "AAAAAAGA9ZJWYVdbylM=" + }, + "model": { + "$ref": "AAAAAAGA9ZJWYFdZQxg=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 280, + "top": -32, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 784, + "top": 464, + "width": 128, + "height": 112, + "nameCompartment": { + "$ref": "AAAAAAGA9ZJWYVdcaco=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGA9ZJWYVdhlw8=" + }, + "operationCompartment": { + "$ref": "AAAAAAGA9ZJWYVdismk=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGA9ZJWYVdjc7A=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGA9ZJWYVdkSog=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGA9ZJsP1eFC4c=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGA9ZJsP1eDUac=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGA9ZJsP1eGJ4k=", + "_parent": { + "$ref": "AAAAAAGA9ZJsP1eFC4c=" + }, + "model": { + "$ref": "AAAAAAGA9ZJsP1eDUac=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZJsP1eHaFY=", + "_parent": { + "$ref": "AAAAAAGA9ZJsP1eGJ4k=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 480, + "top": -16, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZJsP1eIZMM=", + "_parent": { + "$ref": "AAAAAAGA9ZJsP1eGJ4k=" + }, + "font": "Arial;13;1", + "left": 957, + "top": 471, + "width": 94, + "height": 13, + "text": "Doute" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZJsP1eJYe4=", + "_parent": { + "$ref": "AAAAAAGA9ZJsP1eGJ4k=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 480, + "top": -16, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZJsP1eKG1k=", + "_parent": { + "$ref": "AAAAAAGA9ZJsP1eGJ4k=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 480, + "top": -16, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 952, + "top": 464, + "width": 104, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGA9ZJsP1eHaFY=" + }, + "nameLabel": { + "$ref": "AAAAAAGA9ZJsP1eIZMM=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGA9ZJsP1eJYe4=" + }, + "propertyLabel": { + "$ref": "AAAAAAGA9ZJsP1eKG1k=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGA9ZJsP1eL3c4=", + "_parent": { + "$ref": "AAAAAAGA9ZJsP1eFC4c=" + }, + "model": { + "$ref": "AAAAAAGA9ZJsP1eDUac=" + }, + "font": "Arial;13;0", + "left": 952, + "top": 489, + "width": 104, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGA9ZJsP1eMxjc=", + "_parent": { + "$ref": "AAAAAAGA9ZJsP1eFC4c=" + }, + "model": { + "$ref": "AAAAAAGA9ZJsP1eDUac=" + }, + "font": "Arial;13;0", + "left": 952, + "top": 499, + "width": 104, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGA9ZJsP1eNMmk=", + "_parent": { + "$ref": "AAAAAAGA9ZJsP1eFC4c=" + }, + "model": { + "$ref": "AAAAAAGA9ZJsP1eDUac=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 240, + "top": -8, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGA9ZJsP1eOFr4=", + "_parent": { + "$ref": "AAAAAAGA9ZJsP1eFC4c=" + }, + "model": { + "$ref": "AAAAAAGA9ZJsP1eDUac=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 240, + "top": -8, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 952, + "top": 464, + "width": 104, + "height": 113, + "nameCompartment": { + "$ref": "AAAAAAGA9ZJsP1eGJ4k=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGA9ZJsP1eL3c4=" + }, + "operationCompartment": { + "$ref": "AAAAAAGA9ZJsP1eMxjc=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGA9ZJsP1eNMmk=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGA9ZJsP1eOFr4=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGA9ZOUJlezlRQ=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGA9ZOUJlex1ws=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGA9ZOUJle0Nik=", + "_parent": { + "$ref": "AAAAAAGA9ZOUJlezlRQ=" + }, + "model": { + "$ref": "AAAAAAGA9ZOUJlex1ws=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZOUJ1e11G0=", + "_parent": { + "$ref": "AAAAAAGA9ZOUJle0Nik=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 688, + "top": 48, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZOUJ1e2qDM=", + "_parent": { + "$ref": "AAAAAAGA9ZOUJle0Nik=" + }, + "font": "Arial;13;1", + "left": 613, + "top": 535, + "width": 118, + "height": 13, + "text": "Entourage" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZOUJ1e3rrM=", + "_parent": { + "$ref": "AAAAAAGA9ZOUJle0Nik=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 688, + "top": 48, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZOUJ1e4/UY=", + "_parent": { + "$ref": "AAAAAAGA9ZOUJle0Nik=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 688, + "top": 48, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 608, + "top": 528, + "width": 128, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGA9ZOUJ1e11G0=" + }, + "nameLabel": { + "$ref": "AAAAAAGA9ZOUJ1e2qDM=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGA9ZOUJ1e3rrM=" + }, + "propertyLabel": { + "$ref": "AAAAAAGA9ZOUJ1e4/UY=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGA9ZOUJ1e5rc8=", + "_parent": { + "$ref": "AAAAAAGA9ZOUJlezlRQ=" + }, + "model": { + "$ref": "AAAAAAGA9ZOUJlex1ws=" + }, + "font": "Arial;13;0", + "left": 608, + "top": 553, + "width": 128, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGA9ZOUJ1e69cw=", + "_parent": { + "$ref": "AAAAAAGA9ZOUJlezlRQ=" + }, + "model": { + "$ref": "AAAAAAGA9ZOUJlex1ws=" + }, + "font": "Arial;13;0", + "left": 608, + "top": 563, + "width": 128, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGA9ZOUJ1e7QzI=", + "_parent": { + "$ref": "AAAAAAGA9ZOUJlezlRQ=" + }, + "model": { + "$ref": "AAAAAAGA9ZOUJlex1ws=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 344, + "top": 24, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGA9ZOUJ1e8vVs=", + "_parent": { + "$ref": "AAAAAAGA9ZOUJlezlRQ=" + }, + "model": { + "$ref": "AAAAAAGA9ZOUJlex1ws=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 344, + "top": 24, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 608, + "top": 528, + "width": 128, + "height": 96, + "nameCompartment": { + "$ref": "AAAAAAGA9ZOUJle0Nik=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGA9ZOUJ1e5rc8=" + }, + "operationCompartment": { + "$ref": "AAAAAAGA9ZOUJ1e69cw=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGA9ZOUJ1e7QzI=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGA9ZOUJ1e8vVs=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGA9ZWHhVf6V7c=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGA9ZWHhFf476M=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGA9ZWHhVf7xGU=", + "_parent": { + "$ref": "AAAAAAGA9ZWHhVf6V7c=" + }, + "model": { + "$ref": "AAAAAAGA9ZWHhFf476M=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZWHhVf8tLE=", + "_parent": { + "$ref": "AAAAAAGA9ZWHhVf7xGU=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 400, + "top": -192, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZWHhVf9plU=", + "_parent": { + "$ref": "AAAAAAGA9ZWHhVf7xGU=" + }, + "font": "Arial;13;1", + "left": 341, + "top": 39, + "width": 159, + "height": 13, + "text": "SettingsListener" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZWHhVf+b0M=", + "_parent": { + "$ref": "AAAAAAGA9ZWHhVf7xGU=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 400, + "top": -192, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZWHhVf/jEg=", + "_parent": { + "$ref": "AAAAAAGA9ZWHhVf7xGU=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 400, + "top": -192, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 336, + "top": 32, + "width": 169, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGA9ZWHhVf8tLE=" + }, + "nameLabel": { + "$ref": "AAAAAAGA9ZWHhVf9plU=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGA9ZWHhVf+b0M=" + }, + "propertyLabel": { + "$ref": "AAAAAAGA9ZWHhVf/jEg=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGA9ZWHhVgAEdU=", + "_parent": { + "$ref": "AAAAAAGA9ZWHhVf6V7c=" + }, + "model": { + "$ref": "AAAAAAGA9ZWHhFf476M=" + }, + "font": "Arial;13;0", + "left": 336, + "top": 57, + "width": 169, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGA9ZWHhVgBm+w=", + "_parent": { + "$ref": "AAAAAAGA9ZWHhVf6V7c=" + }, + "model": { + "$ref": "AAAAAAGA9ZWHhFf476M=" + }, + "font": "Arial;13;0", + "left": 336, + "top": 67, + "width": 169, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGA9ZWHhVgCATQ=", + "_parent": { + "$ref": "AAAAAAGA9ZWHhVf6V7c=" + }, + "model": { + "$ref": "AAAAAAGA9ZWHhFf476M=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 200, + "top": -96, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGA9ZWHhVgDrUo=", + "_parent": { + "$ref": "AAAAAAGA9ZWHhVf6V7c=" + }, + "model": { + "$ref": "AAAAAAGA9ZWHhFf476M=" + }, + "visible": false, + "font": "Arial;13;0", + "left": 200, + "top": -96, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 336, + "top": 32, + "width": 169, + "height": 105, + "nameCompartment": { + "$ref": "AAAAAAGA9ZWHhVf7xGU=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGA9ZWHhVgAEdU=" + }, + "operationCompartment": { + "$ref": "AAAAAAGA9ZWHhVgBm+w=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGA9ZWHhVgCATQ=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGA9ZWHhVgDrUo=" + } + }, + { + "_type": "UMLClassView", + "_id": "AAAAAAGA9ZZSmVgsZ7Y=", + "_parent": { + "$ref": "AAAAAAFF+qBtyKM79qY=" + }, + "model": { + "$ref": "AAAAAAGA9ZZSl1gq3JQ=" + }, + "subViews": [ + { + "_type": "UMLNameCompartmentView", + "_id": "AAAAAAGA9ZZSmVgt1KQ=", + "_parent": { + "$ref": "AAAAAAGA9ZZSmVgsZ7Y=" + }, + "model": { + "$ref": "AAAAAAGA9ZZSl1gq3JQ=" + }, + "subViews": [ + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZZSmVguwRg=", + "_parent": { + "$ref": "AAAAAAGA9ZZSmVgt1KQ=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -48, + "top": -48, + "height": 13 + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZZSmVgvbmc=", + "_parent": { + "$ref": "AAAAAAGA9ZZSmVgt1KQ=" + }, + "font": "Arial;13;1", + "left": 69, + "top": 543, + "width": 174, + "height": 13, + "text": "MenuListener" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZZSmVgwXMo=", + "_parent": { + "$ref": "AAAAAAGA9ZZSmVgt1KQ=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -48, + "top": -48, + "width": 73.67724609375, + "height": 13, + "text": "(from Model)" + }, + { + "_type": "LabelView", + "_id": "AAAAAAGA9ZZSmVgxED0=", + "_parent": { + "$ref": "AAAAAAGA9ZZSmVgt1KQ=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -48, + "top": -48, + "height": 13, + "horizontalAlignment": 1 + } + ], + "font": "Arial;13;0", + "left": 64, + "top": 536, + "width": 184, + "height": 25, + "stereotypeLabel": { + "$ref": "AAAAAAGA9ZZSmVguwRg=" + }, + "nameLabel": { + "$ref": "AAAAAAGA9ZZSmVgvbmc=" + }, + "namespaceLabel": { + "$ref": "AAAAAAGA9ZZSmVgwXMo=" + }, + "propertyLabel": { + "$ref": "AAAAAAGA9ZZSmVgxED0=" + } + }, + { + "_type": "UMLAttributeCompartmentView", + "_id": "AAAAAAGA9ZZSmVgyOGM=", + "_parent": { + "$ref": "AAAAAAGA9ZZSmVgsZ7Y=" + }, + "model": { + "$ref": "AAAAAAGA9ZZSl1gq3JQ=" + }, + "font": "Arial;13;0", + "left": 64, + "top": 561, + "width": 184, + "height": 10 + }, + { + "_type": "UMLOperationCompartmentView", + "_id": "AAAAAAGA9ZZSmVgzGMo=", + "_parent": { + "$ref": "AAAAAAGA9ZZSmVgsZ7Y=" + }, + "model": { + "$ref": "AAAAAAGA9ZZSl1gq3JQ=" + }, + "font": "Arial;13;0", + "left": 64, + "top": 571, + "width": 184, + "height": 10 + }, + { + "_type": "UMLReceptionCompartmentView", + "_id": "AAAAAAGA9ZZSmVg0D4k=", + "_parent": { + "$ref": "AAAAAAGA9ZZSmVgsZ7Y=" + }, + "model": { + "$ref": "AAAAAAGA9ZZSl1gq3JQ=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -24, + "top": -24, + "width": 10, + "height": 10 + }, + { + "_type": "UMLTemplateParameterCompartmentView", + "_id": "AAAAAAGA9ZZSmVg16u8=", + "_parent": { + "$ref": "AAAAAAGA9ZZSmVgsZ7Y=" + }, + "model": { + "$ref": "AAAAAAGA9ZZSl1gq3JQ=" + }, + "visible": false, + "font": "Arial;13;0", + "left": -24, + "top": -24, + "width": 10, + "height": 10 + } + ], + "font": "Arial;13;0", + "containerChangeable": true, + "left": 64, + "top": 536, + "width": 184, + "height": 120, + "nameCompartment": { + "$ref": "AAAAAAGA9ZZSmVgt1KQ=" + }, + "attributeCompartment": { + "$ref": "AAAAAAGA9ZZSmVgyOGM=" + }, + "operationCompartment": { + "$ref": "AAAAAAGA9ZZSmVgzGMo=" + }, + "receptionCompartment": { + "$ref": "AAAAAAGA9ZZSmVg0D4k=" + }, + "templateParameterCompartment": { + "$ref": "AAAAAAGA9ZZSmVg16u8=" + } + } + ] + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGA9Y6w/1XDIPE=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "Main" + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGA9Y8G0FXv3rA=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "FrameMenu" + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGA9Y8nw1YZH20=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "FrameJeu" + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGA9Y9fkFZDbPY=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "NewGameListener" + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGA9ZBS9lZ1epg=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "Grille" + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGA9ZCHQlahzws=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "Banniere" + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGA9ZC20VbNoms=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "Case" + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGA9ZFcf1cDd+Q=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "Fin" + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGA9ZG/ylctz5M=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "ListenerCase" + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGA9ZJWYFdZQxg=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "Etoile" + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGA9ZJsP1eDUac=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "Doute" + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGA9ZOUJlex1ws=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "Entourage" + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGA9ZWHhFf476M=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "SettingsListener" + }, + { + "_type": "UMLClass", + "_id": "AAAAAAGA9ZZSl1gq3JQ=", + "_parent": { + "$ref": "AAAAAAFF+qBWK6M3Z8Y=" + }, + "name": "MenuListener" + } + ] + } + ] +} \ No newline at end of file diff --git a/Grille.java b/Grille.java index 6e8da60..e15bb3d 100644 --- a/Grille.java +++ b/Grille.java @@ -1,12 +1,14 @@ import javax.swing.*; import java.awt.*; import java.util.Random; +import java.util.Arrays; public class Grille extends JPanel{ private Banniere banniere; private Dimension grilleSize=new Dimension(0,0); private Case[] plateau; private int colonnes; + private int lignes; private int taille; private int mines; private int minesLeft; @@ -20,6 +22,7 @@ public class Grille extends JPanel{ public Grille(int lignes, int colonnes, int mines, FrameJeu fenetre, FrameMenu menu){ super(); this.colonnes=colonnes; + this.lignes=lignes; this.taille=lignes*colonnes; this.mines=mines; this.minesLeft=mines; @@ -30,9 +33,8 @@ public class Grille extends JPanel{ this.grilleSize = new Dimension(((screenSize.height*3/4)/lignes)*colonnes, screenSize.height*3/4 ); Dimension caseSize = new Dimension(this.grilleSize.height/lignes,this.grilleSize.height/lignes); GridLayout damier = new GridLayout(lignes,colonnes); - Banniere banniere = new Banniere(mines,this.fenetre, menu); + Banniere banniere = new Banniere(mines,this.fenetre, menu, grilleSize); this.banniere=banniere; - banniere.setSize(grilleSize.width,grilleSize.height/8); this.setLayout(damier); this.setSize(grilleSize); @@ -203,7 +205,13 @@ public class Grille extends JPanel{ // Methode pour récupérer le plateau de jeu public Case[] getPlateau(){ - return this.plateau; + return Arrays.copyOf(this.plateau,this.taille); + } + + // Méthode pour récupérer le nombre de lignes + public Dimension getDimensionGrille(){ + Dimension grilleSize= new Dimension(this.colonnes, this.lignes); + return grilleSize; } // Méthode pour rendre visibles les cases autour d'un 0 diff --git a/Rapport.odt b/Rapport.odt index 0715a2e..a14768f 100644 Binary files a/Rapport.odt and b/Rapport.odt differ diff --git a/SaveManager.java b/SaveManager.java new file mode 100644 index 0000000..ddb8a09 --- /dev/null +++ b/SaveManager.java @@ -0,0 +1,70 @@ +import java.awt.Dimension; +import java.io.*; + +public class SaveManager { + + public void save(Grille grille, String nomFichier) { + Dimension taille = grille.getDimensionGrille(); + + String metaData= (int) taille.getWidth()+"x"+ (int) taille.getHeight()+"\n"; + try { + BufferedWriter fichier = new BufferedWriter(new FileWriter(nomFichier)); + Case[] toSave = grille.getPlateau(); + + fichier.write(metaData); + + for(Case c : toSave) { + fichier.write(c.toString()); + } + + fichier.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + public SaveData load(String nomFichier) { + String toReturn=""; + String ligne; + Dimension dimension=new Dimension(0,0); + SaveData toRet=new SaveData(null, null); + + try { + BufferedReader fichier = new BufferedReader(new FileReader(nomFichier)); + + ligne=fichier.readLine(); + String[] taille = ligne.split("x"); + + int largeur = Integer.parseInt(taille[0]); + int hauteur = Integer.parseInt(taille[1]); + + dimension = new Dimension(largeur, hauteur); + + while((ligne = fichier.readLine()) != null) { + toReturn += ligne; + } + + fichier.close(); + } catch (IOException e) { + e.printStackTrace(); + } + + toRet.cases=toReturn; + toRet.taille=dimension; + return toRet; + } + + public class SaveData{ + public Dimension taille; + public String cases; + + public SaveData(Dimension taille, String cases) { + this.taille = taille; + this.cases = cases; + } + + public String toString() { + return (int) taille.getWidth()+"x"+(int) taille.getHeight()+"\n"+cases; + } + } +} \ No newline at end of file diff --git a/SaveTester.java b/SaveTester.java new file mode 100644 index 0000000..ec016e9 --- /dev/null +++ b/SaveTester.java @@ -0,0 +1,9 @@ +public class SaveTester { + public static void main(String[] args) { + Grille grille = new Grille(10,10,10, null, null); + SaveManager saveManager = new SaveManager(); + + saveManager.save(grille, "test_sauvegarde.txt"); + SaveManager.SaveData donnees = saveManager.load("test_sauvegarde.txt"); + } +} \ No newline at end of file diff --git a/test_sauvegarde.txt b/test_sauvegarde.txt new file mode 100644 index 0000000..d242bf2 --- /dev/null +++ b/test_sauvegarde.txt @@ -0,0 +1,2 @@ +10x10 +0010000000000000001000000000000001010000000000000010000000000100001000000000000000000001100000000100 \ No newline at end of file