From 2f48036fbe813f42bc1f646c644f42a4b4bf06bf Mon Sep 17 00:00:00 2001 From: "antoine.perederii" Date: Thu, 11 Jan 2024 17:35:57 +0100 Subject: [PATCH] update java's game --- .../tpJeuDeL_oie/Oie/.idea/uiDesigner.xml | 124 ++++++++++++++++++ .../Oie/out/production/Oie/data/Stub.class | Bin 663 -> 668 bytes .../production/Oie/launcher/ConsoleGame.class | Bin 1086 -> 1379 bytes .../Oie/out/production/Oie/models/Case.class | Bin 1074 -> 0 bytes .../Oie/out/production/Oie/models/De.class | Bin 0 -> 630 bytes .../out/production/Oie/models/DeSimple.class | Bin 0 -> 482 bytes .../Oie/models/GestionnaireJoueur.class | Bin 0 -> 1140 bytes .../Oie/out/production/Oie/models/Jeu.class | Bin 1631 -> 809 bytes .../out/production/Oie/models/Joueur.class | Bin 0 -> 1351 bytes .../Oie/out/production/Oie/models/Pion.class | Bin 1247 -> 0 bytes .../out/production/Oie/models/Plateau.class | Bin 1395 -> 1147 bytes .../Oie/out/production/Oie/view/Fenetre.class | Bin 1091 -> 256 bytes .../tpJeuDeL_oie/Oie/src/data/Stub.java | 9 +- .../Oie/src/launcher/ConsoleGame.java | 20 +-- .../tpJeuDeL_oie/Oie/src/models/Case.java | 18 +-- .../tpJeuDeL_oie/Oie/src/models/De.java | 19 +++ .../tpJeuDeL_oie/Oie/src/models/DeSimple.java | 16 +++ .../Oie/src/models/DeplaceurJoueur.java | 17 +++ .../Oie/src/models/GestionnaireJoueur.java | 25 ++++ .../tpJeuDeL_oie/Oie/src/models/Jeu.java | 52 ++++---- .../tpJeuDeL_oie/Oie/src/models/Joueur.java | 22 ++++ .../tpJeuDeL_oie/Oie/src/models/Pion.java | 22 ---- .../tpJeuDeL_oie/Oie/src/models/Plateau.java | 6 - .../tpJeuDeL_oie/Oie/src/view/Fenetre.java | 24 ++-- 24 files changed, 284 insertions(+), 90 deletions(-) create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/.idea/uiDesigner.xml delete 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/De.class create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/models/DeSimple.class create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/models/GestionnaireJoueur.class create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/models/Joueur.class delete 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/src/models/De.java create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/DeSimple.java create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/DeplaceurJoueur.java create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/GestionnaireJoueur.java create mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Joueur.java delete mode 100644 2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Pion.java diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/.idea/uiDesigner.xml b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/.idea/uiDesigner.xml new file mode 100644 index 0000000..2b63946 --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ 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 index bc30cca715b447d424cbf2fd6dbcc338e27e42b3..912a6093dd3d8bdc1b02095fe4b6f3b002c55b5e 100644 GIT binary patch literal 668 zcmZ`$U279T6g`t}vdQkYjnP)C*0z4`HtPO>NI?XpWz|ATppTPeSSRcUOlE}stM;V< z3;qCqlz3;eO`n{HJKT?R&gI-ce}DZ3aD=xW8d!7T1Zbkg(4Fz0JkEHL#^1*?G0_aI z53-Q@h+!>^MlRY6US3W`Hjht)@!-O|TUigVflXpdh5mZ+ahl8GG~*XS zG3Qp3N9xt3*7aH+&eX@pS&7xx&}Z|SRA8~2G?l_nJ)y4bQ}+YDP_a<}SGD_Nui zEB**OE*=MXf~O2S|5YLtJ}ZqDYN^c73vc(TcZo)AJY#UinJ_N)89Gz0c|6o+Ow~_h z0mEh@3-Qh5W1-GC4H8XKPIxxrO4__GI{Js4Gx*7hVL)_Q$)~4e0ChI*Tp?4b>7+a- zwqUhWRrQ9YQ4{f5TBVNN;~ zSPtMNUQx#I8gD3Ca1N&;eRl)*yxnar&`J8&2yW0l@AVdVaE*tne7DXo3D|%Y=@A_0 dz=uc2@X;qJE4aNRtp$CW4H1zf!(oN({{xx;igo}1 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 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 index e2f5c31241c969551138ff04c2d76c7e20779130..004e2698951546a177af8977edb7a353325b20d1 100644 GIT binary patch literal 1379 zcma)6TTc@~6#j;S3+-~h2r63d<)SNir-))z1j|K>C^0b^+DTcm-8I`?Bfr2$pG|z$ zXMHG96XUZ#%J@yUPzZgnO=fq_neUwMeCN#m`TOG+fEldE(S(?RW)m$qBG9!Z-%87o zZqZua*i!jG;K;P?+QE!KEH$!bpjDu)AOmUTf^Z`a12MfMOqgh=%kgAk#rE8?Ku2mM zTk;CZDO(FFOt+yET?V>M^q}`ZrrdTpP$eetLgwqwRyo+7wc^`ukPCbzOX)cJF<{`R zi9rkr#Or~%DXL(_k%5w-KutK;v`OyR}H%dX$?GPvE8CTAJKIQA}jHy zamK(|6X$SVptk`(0ppEk>$of+bvVSxnl9j?i4;ayI|(mt&lXCyOA_147Z|S7o>S$3 z3cAwv)q)qQ&?kd2j2pOQ;xa6Op;`rpPe!pbq3OcqAloPy1!yiwoBbb1y=pW7^h>`;d~X9coy966bCjbndyM z!C*6TUg+o5BU{t%+E?9WEiWhcF>kp3H9_b*&UJx1i%-F4%jgco*Q)yoSM3JxbC#<5bQ6B#egzK>pbrKAe?YywDRhu_90~phSzr?F7^Q8J-=-;a;Q_kw yn%}2Q^ddwbKJe0h!~j0yXjPJAR5qUC8RI1I2|27%lqBBcIo7Hgzo4fHFaH6NW=vTC delta 455 zcmY*VyG{a85Iws*y~{%vM5B;wVS)&Xicj#38VXD-wXh(tL5(cQ3bua4eu)-aP*58` z!p6eVKTyvuAz5>ib7#(+nVgwVF$|0MpTQ8o0nT4UUwV$U^ST9awL^g~TRgng&rq072rm_3KNOcE~vy5W+4o;>H1# zQDHWLJ?uML#$W99@$XwTf4X+@idezMk`0ZKy39Xsqv)ZTuKyE}NZObiDaR%2!=LIp zCd!Br1r)wn+Q=Y^EV&}$TziuDp27)K)RDk7lDOfa+DM^?8P~WrGDqDZ=P0NKfdsC@@ 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 diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/models/De.class b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/models/De.class new file mode 100644 index 0000000000000000000000000000000000000000..5ca59317a2145144348f2191f16ef4f2afd4fc9c GIT binary patch literal 630 zcmYjPe{a%I6g`g?x^|VZ3RB1Y!G4&nf7lOzSz;thFboo=B>v}vy5O7ekkL44+PTm-gi&$J?Ffe{`vd!H-JmL^pJz)!1j?xL7;Re?`4$8bQpE|cWRIc z6kf+^oLvf7=NCN(JO7(zS)4>&ncj{^9voOMcHujC;G>8=0e3XMRmn7JC{lFav>Tmk zfuLphw?^xFY~M$KhXPL8zmfwr6%b90S9~03yl^iQHJfOe$3C9mP`9ctSu>?S`@DJ4 zT&5n=TgnRTwc=E@XQRHFyqEoiNYEM&WYUw9Sl27i&OXOf+ik7Q*6DnxvYrt%cP6(x z-5}o0cs3cRt5}md4fRUj$ga_CjvKWYX_=>-z7jL^Iv6bouDHs0#Oj0T1S;VIBK!sC z;{xs+URa%@^o1p^ihjlXPI(FmNZ{k>cH3qnqNd`my@$o@1(d1FrhI>0`kV9QjnHWipnXcMPK G{p=sKa9=?H literal 0 HcmV?d00001 diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/models/DeSimple.class b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/models/DeSimple.class new file mode 100644 index 0000000000000000000000000000000000000000..b1ee83849f951dc88c394980c18efe4ac0918df6 GIT binary patch literal 482 zcmZ{gy-ve06orqIw4otwX!(bUt?fV`0Mv!5QlyBbD7zCZFv<_gPoJs_QzZr-fQLd{ zJAt7B50>ve$LD_b=hyoOfH^K47%**EE;{Hk^wRuMB;{-&7`nGIlhvHT8vBz_8TVZD z;E?M{R3T49T`-vAiLW%*MPDbBKbj4X!TSwd$@Dd$SnG~PkPygB+}CL&iU%GkVHD&s zPeNWuRkuy6dX^=_FxbhtVX(7k$zwq(^NDud0y(R^E@H8iDzm>3&D`r3zUH{XfKb&k z!PJXsKhPgx=ze#4xdnTpj)5WV>R}+Ca*pV9(ztMlBdS2%W9kur`j<9qrfa%2-NN3G jsfkjfKsFWQ>T{=!A51pxe4R#S literal 0 HcmV?d00001 diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/models/GestionnaireJoueur.class b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/out/production/Oie/models/GestionnaireJoueur.class new file mode 100644 index 0000000000000000000000000000000000000000..a030c35cef8e49e0753453e5bcacfab22a6c06a7 GIT binary patch literal 1140 zcmZ`&ZBNrs7(KV!s2knb1_Kcl0bjPE%y&PGEHN0#Ors{48Te$`Zm>(~OxGImS7{<4 z)5Q4MA7wnZ-5Z;xX>;#$pL3q`ocr|mpYJ~b)bJz)4KW>Y0}0FsWZTw9tKwMhQRUTP zTQ+@xnQhy({hC0mSZXA30ZAPx1G6v$mXA9v>2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HJ>MlF-P2J+dmS$|%cHx7Fwl{`^OR_ew09-O^}>4tEDdy^cP8Px6|u zGPe~S%bK1!387;tbU0yoH{j}1rMpz)y|zC}L+-FH62r#dWUT{i6aTY~9m1yd^`*U( zOP;ipMklM@YSsztFlBhdWWims9cCTO1Nzv@-wc(yH%l+RBO;~dP 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 index 16a888c3578ed5f1ca508eae8f8a2c6bee51dd10..1e8e05b1a06f35cbe11b248c10c8277e9fe7d004 100644 GIT binary patch delta 121 zcmX@i(ZIxY>ff$?3=9l*3<49mOn7<9GE>X--BR;XONvq__c3`+{=*~_z|Oz~RKmc( z2!yN*Y(SC|$kPY&85mf#wlgqp1PU-QZ~;k>Gy{;u4J3KMY*rx63*<2}@Bv9C27UnH CJP<|z 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 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 index 42bcf22..473366f 100644 --- a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/data/Stub.java +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/data/Stub.java @@ -1,15 +1,14 @@ package data; import models.Jeu; -import models.Pion; +import models.Joueur; 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")); + Jeu game = new Jeu(5, 6); + game.getMyAdminPlayer().ajouterJoueur(new Joueur("rouge")); + game.getMyAdminPlayer().ajouterJoueur(new Joueur("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 index e9118db..abaf5a3 100644 --- a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/launcher/ConsoleGame.java +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/launcher/ConsoleGame.java @@ -2,23 +2,23 @@ package launcher; import data.Stub; import models.Jeu; -import models.Pion; +import models.Joueur; 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()); + Joueur currentPlayer = game.getMyAdminPlayer().getCurrentJoueur(); + System.out.println(currentPlayer.toString()); + System.out.println("Changement de Joueur"); + currentPlayer = game.getMyAdminPlayer().nextPlayer(); + System.out.println(currentPlayer.toString()); + game.getMyAdminPlayer().getCurrentJoueur().setMyCase(game.getPlateau().getCaseList().get(0)); + System.out.println(currentPlayer.toString()); System.out.println(game.getPlateau().toString()); - game.avancerPion(); - System.out.println(currentPion.toString()); + game.getMyAdminPlayer().getCurrentJoueur().setMyCase(game.getPlateau().getCaseList().get(0)); + System.out.println(currentPlayer.toString()); System.out.println(game.getPlateau().toString()); } } 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 index 759a91d..2d4f701 100644 --- a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Case.java +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Case.java @@ -2,20 +2,16 @@ 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; + private Joueur myJoueur = null; + public Case(int idCase) { + this.idCase = idCase; } @Override public String toString() { - return this.idCase + " " + this.presence + "\n"; + if(myJoueur){ + return this.idCase + " " + this.myJoueur.toString() + "\n"; + } + return this.idCase + " " + "\n"; } } diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/De.java b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/De.java new file mode 100644 index 0000000..30904f1 --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/De.java @@ -0,0 +1,19 @@ +package models; + +import java.util.Random; + +public abstract class De { + private int valeur; + private int nbFaces; + Random RANDOM = new Random(); + public De(int nbFaces) { + this.nbFaces = nbFaces; + } + + public int getValeur() { + return valeur; + } + public void setValeur(int valeur) { + this.valeur = RANDOM.nextInt(nbFaces) + 1; + } +} diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/DeSimple.java b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/DeSimple.java new file mode 100644 index 0000000..17b320b --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/DeSimple.java @@ -0,0 +1,16 @@ +package models; + +public class DeSimple extends De { + public DeSimple(int nbFaces){ + super(nbFaces); + } + @Override + public int getValeur() { + return super.getValeur(); + } + + @Override + public void setValeur(int valeur) { + super.setValeur(valeur); + } +} diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/DeplaceurJoueur.java b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/DeplaceurJoueur.java new file mode 100644 index 0000000..172212b --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/DeplaceurJoueur.java @@ -0,0 +1,17 @@ +//package models; +// +//public class DeplaceurJoueur { +// private boolean verifPresenceJoueur(Joueur currentJoueur, int valeurDe) { +// if((currentJoueur.getCurrentIdCase() + valeurDe )!= 0) { +// myPlateau.getCaseList().get(currentJoueur.getCurrentIdCase() - 1).setPresence(false); +// } +// return false; +// } +// private void alternerJoueurs(Joueur joueur1, Joueur joueur) { +// +// } +// public void avancerJoueur(Joueur currentJoueur, Plateau myPlateau) { +// currentJoueur.setCurrentIdCase(); +// myPlateau.getCaseList().get(currentJoueur.getCurrentIdCase()-1).setPresence(true); +// } +//} diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/GestionnaireJoueur.java b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/GestionnaireJoueur.java new file mode 100644 index 0000000..740c763 --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/GestionnaireJoueur.java @@ -0,0 +1,25 @@ +package models; + +import java.util.ArrayList; +import java.util.List; + +public class GestionnaireJoueur { + private int currentIdJoueur = 0; + private List lesJoueurs = new ArrayList<>(); + + public List getLesJoueurs() { + return this.lesJoueurs; + } + public Joueur getCurrentJoueur() { + return this.lesJoueurs.get(currentIdJoueur); + } + public void ajouterJoueur(Joueur joueur) { + lesJoueurs.add(joueur); + } + public Joueur nextPlayer() { + return lesJoueurs.get(++currentIdJoueur % lesJoueurs.size()); + } +// public void next() { +// this.currentIdJoueur++; +// } +} 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 index 7cfdb4e..e18b2c1 100644 --- a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Jeu.java +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Jeu.java @@ -5,32 +5,38 @@ 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; + private De myDe; + private GestionnaireJoueur myAdminPlayer = new GestionnaireJoueur(); +// private DeplaceurJoueur myMovePlayer = new DeplaceurJoueur(); + public Jeu(int nbCases, int nbFaces) { + myPlateau = new Plateau(nbCases); + myDe = new DeSimple(nbFaces); } 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); + + public GestionnaireJoueur getMyAdminPlayer() { + return myAdminPlayer; } + // public List getPionsList() { +// return this.pionsList; +// } +// public Joueur getCurrentPion() { +// return pionsList.get(currentPionId); +// } +// public Joueur changePion() { +// return pionsList.get(++currentPionId % pionsList.size()); +// } +// public void avancerPion() { +// Joueur 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(Joueur pion) { +// pionsList.add(pion); +// } } diff --git a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Joueur.java b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Joueur.java new file mode 100644 index 0000000..34dfd95 --- /dev/null +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Joueur.java @@ -0,0 +1,22 @@ +package models; + +public class Joueur { + private String color; + private Case myCase = null; + public Joueur(String myColor) { + this.color = myColor; + } + public String getColor() { + return color; + } + public Case getMyCase() { + return this.myCase; + } + public void setMyCase(Case myCase) { + this.myCase = myCase; + } + @Override + public String toString() { + return "Je suis le Joueur de couleur " + this.color + " et je suis sur la case " + this.myCase.getClass(); + } +} 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 deleted file mode 100644 index c819143..0000000 --- a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Pion.java +++ /dev/null @@ -1,22 +0,0 @@ -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 index a214333..b818b57 100644 --- a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Plateau.java +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/models/Plateau.java @@ -13,12 +13,6 @@ public class Plateau { 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() { 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 index 3048642..1db859b 100644 --- a/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/view/Fenetre.java +++ b/2A/Java/tp/JavaFX/tpJeuDeL_oie/Oie/src/view/Fenetre.java @@ -5,19 +5,17 @@ import javafx.fxml.FXML; import javafx.scene.control.Button; import javafx.scene.layout.BorderPane; import models.Jeu; -import models.Pion; - -import java.awt.*; +import models.Joueur; 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")); - } - } +// @FXML +// private BorderPane myBorderPane = new BorderPane(); +// private final Jeu game = new Stub().loadPions(); +// Joueur currentPion = game.getCurrentPion(); +// +// public void initialize() { +// for(int i = 0; i < game.getPlateau().getCaseList().size(); i++) { +// myBorderPane.setCenter(new Button().setText("hello")); +// } +// } }