From f9d9633d93425f793ad5f7df7a316141e3c86427 Mon Sep 17 00:00:00 2001 From: "antoine.perederii" Date: Tue, 19 Dec 2023 08:17:52 +0100 Subject: [PATCH] add JavaFX's tp --- .../tp/JavaFX/tpJeuDeL_oie/.idea/.gitignore | 0 2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/misc.xml | 6 +++ .../tp/JavaFX/tpJeuDeL_oie/.idea/modules.xml | 8 ++++ .../tpJeuDeL_oie/.idea/tpJeuDeL_oie.iml | 9 ++++ 2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/vcs.xml | 6 +++ .../JavaFX/tpJeuDeL_oie/.idea/workspace.xml | 39 ++++++++++++++++++ .../JavaFX/tpJeuDeL_oie/Oie/.idea/.gitignore | 3 ++ .../tp/JavaFX/tpJeuDeL_oie/Oie/.idea/misc.xml | 6 +++ .../JavaFX/tpJeuDeL_oie/Oie/.idea/modules.xml | 8 ++++ .../tp/JavaFX/tpJeuDeL_oie/Oie/.idea/vcs.xml | 6 +++ 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/Oie.iml | 13 ++++++ .../Oie/out/production/Oie/data/Stub.class | Bin 0 -> 663 bytes .../Oie/out/production/Oie/fxml/Fenetre.fxml | 9 ++++ .../production/Oie/launcher/ConsoleGame.class | Bin 0 -> 1086 bytes .../production/Oie/launcher/GraphicGame.class | Bin 0 -> 1090 bytes .../Oie/out/production/Oie/models/Case.class | Bin 0 -> 1074 bytes .../Oie/out/production/Oie/models/Jeu.class | Bin 0 -> 1631 bytes .../Oie/out/production/Oie/models/Pion.class | Bin 0 -> 1247 bytes .../out/production/Oie/models/Plateau.class | Bin 0 -> 1395 bytes .../Oie/out/production/Oie/view/Fenetre.class | Bin 0 -> 1091 bytes .../tpJeuDeL_oie/Oie/res/fxml/Fenetre.fxml | 9 ++++ .../tpJeuDeL_oie/Oie/src/data/Stub.java | 15 +++++++ .../Oie/src/launcher/ConsoleGame.java | 24 +++++++++++ .../Oie/src/launcher/GraphicGame.java | 18 ++++++++ .../tpJeuDeL_oie/Oie/src/models/Case.java | 21 ++++++++++ .../tpJeuDeL_oie/Oie/src/models/Jeu.java | 36 ++++++++++++++++ .../tpJeuDeL_oie/Oie/src/models/Pion.java | 22 ++++++++++ .../tpJeuDeL_oie/Oie/src/models/Plateau.java | 31 ++++++++++++++ .../tpJeuDeL_oie/Oie/src/view/Fenetre.java | 23 +++++++++++ 29 files changed, 312 insertions(+) create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/.gitignore create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/misc.xml create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/modules.xml create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/tpJeuDeL_oie.iml create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/vcs.xml create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/workspace.xml create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/.idea/.gitignore create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/.idea/misc.xml create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/.idea/modules.xml create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/.idea/vcs.xml create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/Oie.iml create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/data/Stub.class create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/fxml/Fenetre.fxml create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/launcher/ConsoleGame.class create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/launcher/GraphicGame.class create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/models/Case.class create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/models/Jeu.class create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/models/Pion.class create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/models/Plateau.class create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/view/Fenetre.class create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/res/fxml/Fenetre.fxml create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/data/Stub.java create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/launcher/ConsoleGame.java create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/launcher/GraphicGame.java create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Case.java create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Jeu.java create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Pion.java create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Plateau.java create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/view/Fenetre.java diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/.gitignore b/2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/misc.xml b/2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/misc.xml new file mode 100644 index 0000000..639900d --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/modules.xml b/2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/modules.xml new file mode 100644 index 0000000..def6ce6 --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/tpJeuDeL_oie.iml b/2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/tpJeuDeL_oie.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/tpJeuDeL_oie.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/vcs.xml b/2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/vcs.xml new file mode 100644 index 0000000..bc59970 --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/workspace.xml b/2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/workspace.xml new file mode 100644 index 0000000..098af3c --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/.idea/workspace.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + 1702623908454 + + + + \ No newline at end of file diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/.idea/.gitignore b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/.idea/misc.xml b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/.idea/misc.xml new file mode 100644 index 0000000..a346fd7 --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/.idea/modules.xml b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/.idea/modules.xml new file mode 100644 index 0000000..248ea68 --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/.idea/vcs.xml b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/.idea/vcs.xml new file mode 100644 index 0000000..821e530 --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/Oie.iml b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/Oie.iml new file mode 100644 index 0000000..9d6237f --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/Oie.iml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/data/Stub.class b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/data/Stub.class new file mode 100644 index 0000000000000000000000000000000000000000..bc30cca715b447d424cbf2fd6dbcc338e27e42b3 GIT binary patch literal 663 zcmY*WVN2Uk6g{s^nB$I8YkHgxYxfpsrG!gH!0IXY5m*kwSbfhY1C{=iBnr4eGL+GUOhcWQMI-wa zUeRyxf5I`xMTsnwiL|`VVn;5o!O3;`tLSS1l@-FqSWYPBERcDV-AnRxsLn!d#L`BO z^zzujJ6@T7D&S8-ow3c#=P7vB_NNec1-!$kVeo?9GdgnuKHwuWfnDq|w)uSn167_! zGnoCx6jm^U(?6J^^{qR@YTsR(V*L*`=gC%?+_IxWL%;@&02W^xE}Gb;Ru@Z!YI{Dp WRJEx32_AJ_Y@vhwVvU1hQuh&%)Paux literal 0 HcmV?d00001 diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/fxml/Fenetre.fxml b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/fxml/Fenetre.fxml new file mode 100644 index 0000000..2d535f3 --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/fxml/Fenetre.fxml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/launcher/ConsoleGame.class b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/launcher/ConsoleGame.class new file mode 100644 index 0000000000000000000000000000000000000000..e2f5c31241c969551138ff04c2d76c7e20779130 GIT binary patch literal 1086 zcmZ`&YflqF6g|Uh>2`tALcs@GpR|Ci4}4JswTg*Zm86D9j31`kNm;TFv+SDqv-Cqr zH1P-cNBkGYGcDK>Yn#mMJ$LTC=ghtH^Y^zO05-90VhFrm@HSEAZjZA z(0-}XY6ert8JM<^N8wbZ`sc$$1uPJytT*d)ICzo06MJD&Phus5s)<N2_Jl0q zaja5bZJ*sy0b@%|RnqY~^-T-6bZXP>xKH3a7S?oMvutbVs#xO&?op^O)6m^lv0Y=c zB453bff5+0v0>!nc%gco1`QRzl?|Ur-ici4@5mxQ{L!L44`BA8^%faJV0GwYmqejw-DTHt>ju4*sQI5cl*ujJ+dd+Ay83 zm|SjSrj4_0l=yZ16_J%TmT2-Tf1?ZAeK1emK6U6+g8#XCWY;lC5+<_z&y(%~Ca_4% z=CfNvj&FS$PxGTt&7MPaXrz#3$m?BL;fl}~i*l1j9wRCW8b(oM$XvO{ zFig0+BJfUpOEAop`jG3PZ@Ud6CL>J!-L7e*p<-MnV1gkRyIRoVHy%U9GzAhTBd|!Z{)YR)4OPriAeRhvX-?L@{H7uR$=c^yv`AwHccqXL!(>+o z)uJEESYMZlDyXWM*RX)aKIo7)gkF~;B{vXZ#KJIk1t~fxn063|iZ_TipK?hf|1(D3j6WN8KpvA$*4M3;UHWBre7GJfa%C z@VJythV;g%CEBvl0~Kp=1-p&<&q7}HsGT-#8FIESGmEmWn8khij^vX7MTaDf4{4{< z%xE60oPm9d%#Uc4W?%@9Y1Fz7c!H<2V|a$=1R^hgMG6YdOXpDcD;*5wGacm4Ft$D4 z!Q@X&?NrY(v%gTlTmiSwaHoTEwFAA!QzR*pAxGcf1Tv^1OOkRCZ>5VJ^AZaTEE9hY d(|AFDh6LRh!%NgKfK@_K$o7ifby_E|@fX`<0Du4h literal 0 HcmV?d00001 diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/models/Case.class b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/models/Case.class new file mode 100644 index 0000000000000000000000000000000000000000..932909187cbfcf025cf82aec7d528f51325bf848 GIT binary patch literal 1074 zcmaJ=+iuf95Iviuc9J@ANlQv8mjWp`0U9nZNI`iZQbnXdkx~UIJZ+p+;>NKfdsC@@ z!bk7`5*1P(_y9f%F>70`5fQSyJ2N_S=FE8f>-WV^0ByW1B7>}soPjlH3>zo>ls8@O zO`1oe6JbjR?X}}MvdxgS>VpFEDCj5}Sck!|KKIAM4VxVv3PL*L*kE0SD;qGe!H{1B zA{3rY2sW%x*@}TpY%y%l`Al?t&*t)@Bd27Al6x{_s9N1&y?3RhF9XM$v>0+$w?3e& zLvJxR^r?OoaS!DUUiFQY=iz za@J5)%u7EO!LVhmlveEf%fJ?gj?z(3gE&wP&`jU>z6@o+7w?3e`s2{l@UVzSuyoYb zC>jj4t6m-N)SroFTrHl?A-AO;oH2a1QbS3AG3i_Gja?DedcHqfE?OyAGP_jduf*fC zg;)Xql)}fG&`NimP;|KK_8lo&c|4)7!uD8^!RUIP2s$ngLlNp|GVK4;-73*Ko-^F} zKa`d%?hyBA!!oo?8G2|JBa7CJ?i?5`^L09_X!t{lw+oZXqQ4X^;<=S_h<@nm#-*C)hUw@U5UBCHQ*~n(uy`y gipmLJ7WX661Jvlw6U#omkMWeeB3TD`h8NiR1Hy~mDF6Tf literal 0 HcmV?d00001 diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/models/Jeu.class b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/models/Jeu.class new file mode 100644 index 0000000000000000000000000000000000000000..658b924bae9bab2b78bbf2b07a61553ae3fc0808 GIT binary patch literal 1631 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 literal 0 HcmV?d00001 diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/view/Fenetre.class b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/view/Fenetre.class new file mode 100644 index 0000000000000000000000000000000000000000..16a888c3578ed5f1ca508eae8f8a2c6bee51dd10 GIT binary patch literal 1091 zcmaJ=+foxj5IvJb)@(L_0fUGjc)=tp>kV%~6woMEKuWBXK3S7wz`@O~wL6R8vtQzi z&sISwrOFTR8~hT>QhSy_!iz6G(>>ki^lg6p`Su;aH0Djj5I2ypa0Fcpy=#1(+YWbE z?Pt|BQBw?EQ__`cnjxOcR}36w7|~8E8+K3=t{~@4FI4ud=hub5#9d*+Ks<>QECXo^ z-RNPk)}?rFm&jlFg4D)l+n-^y{C~uvfnyBGI#=9YR$J_&C$OK2u&5I`VPOy_84|0!q1ij%O`O88fe{O*G0I@JLkVhCsJYPhg{w3; zLr)u98zS&C7S7@vL#o#4ncnA!{4~k9g$u|L1A#6%TnQdBWI6!%Y(*0VTr_aW!evZQ z4y}X^LQ*;@9*D9GXgV4onpvo%V{2P6g)6vf;F^W&xIqAipQ#Ih{6Jlxan2jK$uM-N z`8Cf~zUSDpp;De}Vp4b7z#R*BQKU`>#7_MXK0`Klcy5c-^0*^gP-XgGH1!R}>of*ADbV84tWQ^?eXGl(y_L`y?o%zBJSYa2&s~se_VbZmiu9+tKwlPpB zY+;~@p>2$Pi6HKi%pgJ1BAF)A9t_iBKZq<5AZ9R28pGTH*=Cd?P>4?r?IE6TBL5XO z!zUuyg1L)HV!hSG?T?Io{`*t2#nEQ#qkq#+h4dkhY{ZtOf?~9x5Ai4}q|o9mQDhRa Q--xka7^kPlWQgI(KN(c>82|tP literal 0 HcmV?d00001 diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/res/fxml/Fenetre.fxml b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/res/fxml/Fenetre.fxml new file mode 100644 index 0000000..2d535f3 --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/res/fxml/Fenetre.fxml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/data/Stub.java b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/data/Stub.java new file mode 100644 index 0000000..42bcf22 --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/data/Stub.java @@ -0,0 +1,15 @@ +package data; + +import models.Jeu; +import models.Pion; +import models.Plateau; + +public class Stub { + public Jeu loadPions() { + Plateau myPlateau = new Plateau(5); + Jeu game = new Jeu(myPlateau); + game.addPion(new Pion("rouge")); + game.addPion(new Pion("bleu")); + return game; + } +} diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/launcher/ConsoleGame.java b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/launcher/ConsoleGame.java new file mode 100644 index 0000000..e9118db --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/launcher/ConsoleGame.java @@ -0,0 +1,24 @@ +package launcher; + +import data.Stub; +import models.Jeu; +import models.Pion; + +public class ConsoleGame { + + public static void main(String[] args) { + final Jeu game = new Stub().loadPions(); + System.out.println(game.getPlateau().toString()); + Pion currentPion = game.getCurrentPion(); + System.out.println(currentPion.toString()); + System.out.println("Changement de Pion"); + currentPion = game.changePion(); + System.out.println(currentPion.toString()); + game.avancerPion(); + System.out.println(currentPion.toString()); + System.out.println(game.getPlateau().toString()); + game.avancerPion(); + System.out.println(currentPion.toString()); + System.out.println(game.getPlateau().toString()); + } +} diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/launcher/GraphicGame.java b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/launcher/GraphicGame.java new file mode 100644 index 0000000..d068c4d --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/launcher/GraphicGame.java @@ -0,0 +1,18 @@ +package launcher; + +import javafx.application.Application; +import javafx.fxml.FXMLLoader; +import javafx.scene.Parent; +import javafx.scene.Scene; +import javafx.stage.Stage; + +public class GraphicGame extends Application { + @Override + public void start(Stage primaryStage) throws Exception { + FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/Fenetre.fxml")); + Parent root = loader.load(); + + primaryStage.setScene(new Scene(root, 700, 500)); + primaryStage.show(); + } +} diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Case.java b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Case.java new file mode 100644 index 0000000..759a91d --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Case.java @@ -0,0 +1,21 @@ +package models; + +public class Case { + private int idCase; + private boolean presence; + public Case(int i){ + idCase = i; + presence = false; + } + public boolean getPresence() { + return this.presence; + } + public void setPresence(boolean presence) { + this.presence = presence; + } + + @Override + public String toString() { + return this.idCase + " " + this.presence + "\n"; + } +} diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Jeu.java b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Jeu.java new file mode 100644 index 0000000..7cfdb4e --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Jeu.java @@ -0,0 +1,36 @@ +package models; + +import java.util.ArrayList; +import java.util.List; + +public class Jeu { + private Plateau myPlateau; + private List pionsList = new ArrayList<>(); + private int currentPionId = 0; + public Jeu(Plateau myPlateau) { + this.myPlateau = myPlateau; + } + public Plateau getPlateau() { + return this.myPlateau; + } + public List getPionsList() { + return this.pionsList; + } + public Pion getCurrentPion() { + return pionsList.get(currentPionId); + } + public Pion changePion() { + return pionsList.get(++currentPionId % pionsList.size()); + } + public void avancerPion() { + Pion currentPion = pionsList.get(currentPionId); + if(currentPion.getCurrentIdCase() != 0) { + this.myPlateau.getCaseList().get(currentPion.getCurrentIdCase() - 1).setPresence(false); + } + currentPion.setCurrentIdCase(); + this.myPlateau.getCaseList().get(currentPion.getCurrentIdCase()-1).setPresence(true); + } + public void addPion(Pion pion) { + pionsList.add(pion); + } +} diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Pion.java b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Pion.java new file mode 100644 index 0000000..c819143 --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Pion.java @@ -0,0 +1,22 @@ +package models; + +public class Pion { + private String color; + private int idCase = 0; + public Pion(String myColor) { + this.color = myColor; + } + public String getColor() { + return color; + } + public int getCurrentIdCase() { + return this.idCase; + } + public void setCurrentIdCase() { + this.idCase++; + } + @Override + public String toString() { + return "Je suis le Pion de couleur " + this.color + " et je suis sur la case " + this.idCase; + } +} diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Plateau.java b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Plateau.java new file mode 100644 index 0000000..a214333 --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Plateau.java @@ -0,0 +1,31 @@ +package models; + +import java.util.ArrayList; +import java.util.List; + +public class Plateau { + private List CaseList = new ArrayList<>(); + public Plateau(int nbCase) { + for(int i = 1; i <= nbCase; ++i) { + CaseList.add(new Case(i)); + } + } + public List getCaseList() { + return this.CaseList; + } + public boolean addCaseList(Case myCase) { + return this.CaseList.add(myCase); + } + public boolean removeCaseList(Case myCase) { + return this.CaseList.remove(myCase); + } + + @Override + public String toString() { + String plateau = ""; + for(int i = 0; i < CaseList.size(); i++) { + plateau = plateau.concat(CaseList.get(i).toString()); + } + return plateau; + } +} diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/view/Fenetre.java b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/view/Fenetre.java new file mode 100644 index 0000000..3048642 --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/view/Fenetre.java @@ -0,0 +1,23 @@ +package view; + +import data.Stub; +import javafx.fxml.FXML; +import javafx.scene.control.Button; +import javafx.scene.layout.BorderPane; +import models.Jeu; +import models.Pion; + +import java.awt.*; + +public class Fenetre { + @FXML + private BorderPane myBorderPane = new BorderPane(); + private final Jeu game = new Stub().loadPions(); + Pion currentPion = game.getCurrentPion(); + + public void initialize() { + for(int i = 0; i < game.getPlateau().getCaseList().size(); i++) { + myBorderPane.setCenter(new Button().setText("hello")); + } + } +}