From cf73e717ed2bbfb616c005e275de4ce0e0af7b22 Mon Sep 17 00:00:00 2001 From: Develog Date: Thu, 29 Nov 2018 17:38:30 +0100 Subject: [PATCH] #7 --- .../bin/Resources/BeginningConversation.txt | 8 ++ Projet/bin/Resources/Conversation | 8 +- Projet/bin/projet/Bag.class | Bin 0 -> 1158 bytes Projet/bin/projet/City.class | Bin 0 -> 4034 bytes Projet/bin/projet/Command.class | Bin 0 -> 264 bytes Projet/bin/projet/Game.class | Bin 0 -> 3298 bytes Projet/bin/projet/Hero.class | Bin 0 -> 1560 bytes Projet/bin/projet/Item.class | Bin 0 -> 970 bytes Projet/bin/projet/ItemMoney.class | Bin 0 -> 813 bytes Projet/bin/projet/ItemTicket.class | Bin 0 -> 816 bytes Projet/bin/projet/Main.class | Bin 0 -> 436 bytes Projet/bin/projet/NPC.class | Bin 0 -> 1150 bytes Projet/bin/projet/Parchment.class | Bin 0 -> 541 bytes Projet/bin/projet/Place.class | Bin 0 -> 1049 bytes .../src/Resources/BeginningConversation.txt | 8 ++ Projet/src/Resources/Conversation | 12 +- Projet/src/projet/Bag.java | 35 +++++ Projet/src/projet/City.java | 124 ++++++++++++++++++ Projet/src/projet/Command.java | 8 ++ Projet/src/projet/Game.java | 85 ++++++++++++ Projet/src/projet/Hero.java | 55 ++++++++ Projet/src/projet/Item.java | 28 ++++ Projet/src/projet/ItemMoney.java | 18 +++ Projet/src/projet/ItemTicket.java | 17 +++ Projet/src/projet/Main.java | 9 ++ Projet/src/projet/NPC.java | 47 +++++++ Projet/src/projet/Parchment.java | 18 +++ Projet/src/projet/Place.java | 47 +++++++ 28 files changed, 515 insertions(+), 12 deletions(-) create mode 100644 Projet/bin/Resources/BeginningConversation.txt create mode 100644 Projet/bin/projet/Bag.class create mode 100644 Projet/bin/projet/City.class create mode 100644 Projet/bin/projet/Command.class create mode 100644 Projet/bin/projet/Game.class create mode 100644 Projet/bin/projet/Hero.class create mode 100644 Projet/bin/projet/Item.class create mode 100644 Projet/bin/projet/ItemMoney.class create mode 100644 Projet/bin/projet/ItemTicket.class create mode 100644 Projet/bin/projet/Main.class create mode 100644 Projet/bin/projet/NPC.class create mode 100644 Projet/bin/projet/Parchment.class create mode 100644 Projet/bin/projet/Place.class create mode 100644 Projet/src/Resources/BeginningConversation.txt create mode 100644 Projet/src/projet/Bag.java create mode 100644 Projet/src/projet/City.java create mode 100644 Projet/src/projet/Command.java create mode 100644 Projet/src/projet/Game.java create mode 100644 Projet/src/projet/Hero.java create mode 100644 Projet/src/projet/Item.java create mode 100644 Projet/src/projet/ItemMoney.java create mode 100644 Projet/src/projet/ItemTicket.java create mode 100644 Projet/src/projet/Main.java create mode 100644 Projet/src/projet/NPC.java create mode 100644 Projet/src/projet/Parchment.java create mode 100644 Projet/src/projet/Place.java diff --git a/Projet/bin/Resources/BeginningConversation.txt b/Projet/bin/Resources/BeginningConversation.txt new file mode 100644 index 0000000..4817cf6 --- /dev/null +++ b/Projet/bin/Resources/BeginningConversation.txt @@ -0,0 +1,8 @@ +Welcome to gameName created by Marc Léger, Camille Paquet, Michaël Parmentier, Mathieu Pereira. +You must travel across the France to discover a treasure. You can go in 17 cities like Paris, Bordeaux or Poitiers. +To know where you can find the treasure you need to find 5 parchments in differents places which will give you the path to follow. +So I don't even know your name. Could you give me your name dear stranger. +Fine ! Nice to meet you ! I give you a bag to carry your items and parchments. But you need some money to travel because the train or the airplane isn't free. +So I give you the incredible sum of 100 Donuts. It's forbidden to eat them ! +And today I'm sweet so I give you one ticket to take the train or the airplane. +Now leave me alone ! We are arrived to the City Hall of . \ No newline at end of file diff --git a/Projet/bin/Resources/Conversation b/Projet/bin/Resources/Conversation index ad61aee..a6e673b 100644 --- a/Projet/bin/Resources/Conversation +++ b/Projet/bin/Resources/Conversation @@ -1 +1,7 @@ -Welcome \ No newline at end of file +Congrats ! You find 1 of 5 fragments parchments. +Congrats ! You find 2 of 5 fragments parchments. +Congrats ! You find 3 of 5 fragments parchments. +Congrats ! You find 4 of 5 fragments parchments. +CONGRATULATION ! You find all of the 5 fragments parchments. So now you have everything to take a treasure which gonna change your life ! + +You've discovered the treasure ! It was so simple this time ! Try one more time maybe it will be simpler ! \ No newline at end of file diff --git a/Projet/bin/projet/Bag.class b/Projet/bin/projet/Bag.class new file mode 100644 index 0000000000000000000000000000000000000000..4db6dde13fb1b3eccea3cf97977198a5c395e2c5 GIT binary patch literal 1158 zcmaixYflqF6o%hvOG}rnEiJclQBc&jDD{Guq=cjpjhJ!~ni}~+re#wWw_CE^lIXAT z2k^y2A<@Ji;EyuCvt3$@MZe7MoH_H%InVj|>)Q_iOL!hZKtMZonn#A4UzPO;LIQ~+ zc_QXA`%1tL{hUw4g$z-Y-kZM&wGFFKC=P%>L?K_I$o)@|vw9YbKgU(RyL ze@1Z%E4-o;x-FgBVZ*TbM)se#x{2P^)aL5WetD~0EbVU>ch+8Qyx1%Yh;@P3TGMX1 z(snD-Y8yeeIUo>THf_^g5eR0o6@k!N^T5y$L`p{-i3mmoQhnOeFoIMR0uwq05LSPa zI-&>*#7m}aY_=O!!zs(E#io;`W=&cZ>6mKo2Se_m*5F( zt*9q&>bQk@7RxjW&vd+8nnxkK$0kf~9(Zn9 zW9bG9N>TK1Ti*nE z=_`2mvFO#8#{-}Dnms5NarT=&!^6Q(7zmvPPZCtj|I Lk@J+l0X+K+g$vZC literal 0 HcmV?d00001 diff --git a/Projet/bin/projet/City.class b/Projet/bin/projet/City.class new file mode 100644 index 0000000000000000000000000000000000000000..f4f1aea79f5b9cec634248b3e5482714138f167a GIT binary patch literal 4034 zcmai1YjhN68Ga_W*(}3tA>kTWQc9C0A(W;lgwjHQ5}GWOKrr-zlig`DWU~`yXKBD% zTCLVwD_+oo)wZYvYtURcN7hG-W0%QLEw3@|uDm4+vw2XbB}4Z(N17 zK$Zmx?^BwC!!zu%xNf{i9vYeMGa)qefP%4Cn}jxr!Q?i!~aSHg%N+sYBTBFi?xIjyp9hQYk71JB+nhCVWi> z<{?Z7yX~|U&yEaO?jds^rBdr8%v7K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U-iASgs6aGI5L!tMOL@)!`lW8ygl}MwgjQ*u2!_$>TMnJ+zqlV@3;|4|}CEu>b%7 literal 0 HcmV?d00001 diff --git a/Projet/bin/projet/Game.class b/Projet/bin/projet/Game.class new file mode 100644 index 0000000000000000000000000000000000000000..92ab033cffdb9ab98799992ea659e8ffded186f6 GIT binary patch literal 3298 zcmb7GTX-8s75>L7XC-CrD2mf2p($zNHnto`4Uhnlne(4B z=lti)yz!q`Ujy(iys4u>U~9p3=A@rIW6nz*A%WPOxnL&qrahB9J2fYBzCbu{d48Ye zFA40-1k**|$|rkV*IdeQDkTsZvu145FS=5o^{v))Wh#agPO6(Kp;_rV0!?cZgB()a zG$m&&+qUePak)t2@iJQA(3tO1&P7|gEZg$C1+=#I2}1Qb(=rMT+YL0KIgA|wh=A@I z*a{=cuUif5LbE_L=StI;$_pjlW8iH{9Pxb9^;Hle*o(L8xVSWMP{&;xAyykS(1vzyaz^?+IlpM;%VFKt*1i^o zAU;uapi{@84P_-Za2QE}W-9kfFXvhX-*Rk$7HV%~trDatj^Ld--XX9fn5%WvAOVgF z=mq6_o)|mZHbbb;Zp&D<94^jJNq5|w$}_$3jFU6-6Q*maaYY#NXDzQPnJSVg9ZZ$6 zX8p94mtmX`IOw^#@?ra6nj1LP45;TJc416Sj_noqu zVl53HK~6D*&^5eRb9h3z_Mm|oRXUBiyyG#mmMY8Po}qzm1#-?nULorw>oCcnf@B+T zP@v3}g}j*~m-?$6@0&HWaI2>QyvVop|SNia#x>qH5tM2EdH;iy!e3i@A#h2(goGM^r1U>OII z=AYZEFs{}H*Efy%X71dOSqQ2}$D?cB)b`aVE?~RrD32Rx#Fj9gWVA3Y)2s}lVR8)|0BvBP+l#Orn3 zX=xT0!}vO_XUa>y$%%~IH)t-nRQNVCKPp*~UKrnDD(HmiO|iUZ!uT#*SjOBp>f~l+ zfc^p(51Y2H7GEOFxKqqKMMa>OxOB*|{Q?(S(hcMLbY$4daq5RO-Rnxv594Ki_FHqx zy`NBh#IbxXCfF5Dj7n>s!MTQI9j`Ev8x=cb`m+YEqeSzrX-_-z!Qs)bqIAQ+&+saZ zdDg?s8qbup693%5FYp@2f;&)R*)Xnj)g9xEsV}E%||2N)c+;%)f(A}XDrf64QCUH6L;4s0cw8Ur2 zv6(AjUd1esooAT55*Es`4WF(u$hYGnUcf`#`xU&xw+0o-`*ACuyBNjYjNcxv+KW~` zPxF127mO?pV3y3VaS%Rl3(xX>5eXu7;1UkuWpolRNyNLc%tpP+KK)l5#XpGtPv$~p zW0WLd#4Fi|;w3EMVdi58p2J7+vB0-y@Cd&&(&#Wgj!!U4=hwe3G1H&Krzl${snnOi zr-^t1`b|39s6*&DuHzJc%zJC1^(HNbs>N!>LpKpqZ}OM}_2w0fPqI+F888-NlG(eE zUBPFr<1t3`u~l?r<4=UN6@0dYFWk2-dO8%U7kxR@STFi&XiL55Ynom!`i2&+7kx{M zZPI*Bi)~W9sKqwvKCi_h^?2XYV$pipi&|`Jz3j3UGwNkO&|*#XvL9)&=6czWwb-_L z*-y1ttRmYe-eD#lyi9FHibU%oX-=RY-Mm?x#2ioZN6>?((Tf++$41zXzhD4=Cn5ih zGa|z4(_W;-5!@pNct^_e*05giVsgFUdD@mUiv`j~^`&Dsa8;$Rgq6q74f1Qh8XbJ9 zgw@xr2s_ukEQ?X%j|G-*;XKhRmYXR5BmSf~hBpG; GKmQlyFDtJA literal 0 HcmV?d00001 diff --git a/Projet/bin/projet/Hero.class b/Projet/bin/projet/Hero.class new file mode 100644 index 0000000000000000000000000000000000000000..6d6903a2b8375d1de5bd2d3236ed98402c59b921 GIT binary patch literal 1560 zcmZuxT~8B16g>l_rR|m$1eEe2$cJqaDj|9<@e@CYv>=o5&aIgJz3&A&CBMg$>&)QS8m z^L1(0^6$$hX2lf<+49sB7%6tHj$FsGYuf??rw!XY7Z3*mgYVS-^_zWxM4@3fU1_@| zS#O#BY*;0%Vbaks^*7lcWO~AN1ekGN(@Q!6$?k-7YZYs}~ z=u4qdHDl;U+Q2v_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EG{Sy_zsN Ni^`OV&`D5_{sBeOt=#|s literal 0 HcmV?d00001 diff --git a/Projet/bin/projet/ItemTicket.class b/Projet/bin/projet/ItemTicket.class new file mode 100644 index 0000000000000000000000000000000000000000..8c62860291f0c45a0097d49d99259de515ddbb29 GIT binary patch literal 816 zcmZuv+iuf95IvKGI&n-c?j;36n{p|MLmQBIB8Ue-h)5BAXcYPK4_8l$f4K?~_mla)jbi znUD+IsUX<>iF@XDd^Z?(j#VUsahH()9J_&%>I;E-gtccfkm@;MtGSBqwFW%wWjGQh zvbb)c0J8u>*}^rf>8NVKK%Ogo8Hl&>bSR<|cjzbNq38MoH zu)n)xCnx#5VTy=6492%Pr}Pwg!3JBV-#-8ydQA;Q^ZbuI_9mf)U~1s-Bg# zQvF>$!qFqzgnF~Ls%IH^VBruowp4`+F$D8Cj3ZCHmfC{y|4(wLp96dBSe8Fi2DUbk zBU{^-R7ji4_eIX$GfLyCPP={q%W0pZ literal 0 HcmV?d00001 diff --git a/Projet/bin/projet/Main.class b/Projet/bin/projet/Main.class new file mode 100644 index 0000000000000000000000000000000000000000..5042efb4a6d547316090ea4e3e570b5016169132 GIT binary patch literal 436 zcmZutO-sW-6r4@d=A*5RR;wPpwI0mHTSX8-FHsMbfOy)}C2mL)iK+j~Q$fKW;Exh# zTcJJ3!h1XKy_wm!-#;H;08Vk}z!GS`RAr{>@J8ywfh`bZ@=b=hEYk2U$<(wKXr1Xo z*XII_;V2fcFUu$8qXDmjCRzf$NEhmMK1)<}FOyse>_p{M=CQ1_!GA@&e%7x7-Dtyd zOt~4Y1qQ>%Xl*^ID_x}HQS4xQ{m5%Mqj3O_ELo)#>;FSyGv(lhli|_HpOo`zs;;zo zqGvWfF^)I_SL2@m7H?dM(IE<%1#|Ow0r!2`_8CnZB(xbjs{!UNk%ukxSTW=aidm-i jiQr+uA6X0d%Z3A&$A}D8gXm+I$fdv@YsPz@*uudtA;?iS literal 0 HcmV?d00001 diff --git a/Projet/bin/projet/NPC.class b/Projet/bin/projet/NPC.class new file mode 100644 index 0000000000000000000000000000000000000000..c91fda5af406f8da6a48996bd2146f79c0e4e4c5 GIT binary patch literal 1150 zcmZ`&+fvg|6kVrHn^ICJg>n@tAlimYz2Ax`GB7gJq7F&2Q5O(1<> z9b3hQ<<^VOcMt5EFQ9F$R@MbFTP0B#>}gt2N&_wgtp1hHmbxR|Hb!5OveH z4`tNLw%zibrYjI%bzARkkH)g&I{u2lM*ckTnfwdf=a>|#EWXysZ$9pM>1uW@UJe7`b4HR)*K)3ex{;j1XP~+Jr_+Q#65~P1@ zd(N8=U0Jdhs3Do&#eE(3&g@691O^`9A?e!h+E#<(I0F!@P^rMxh+CoXscqk?y{%YB z;TWkB-O24{+pF0djvRM_qg;|2Yts}c%5{w)BQ>NIkqWAl`ti(2_0&o2cxuc@p^wjg z-aaxu#xrMrL)x70V9?Y$$eIfsjF^iZjG1G+PkdoW1e1JD5gr&KOqL5WOrQ}AVwArz z`o{T}-;RPr4wrc&IHp-zC~JnKBFd7qB=wwJDn)A+S3+79#>l9F`4h~UUomomc~g+n zDUm*vJjw2+kS2&MJRBtbDLjB1xJgKXTO<{9TsvZOA8A8tz udhS2aCDqfi$`Wa!>v$B_DDsr;##kf!nMN?XU1_4qd@^39+C literal 0 HcmV?d00001 diff --git a/Projet/bin/projet/Parchment.class b/Projet/bin/projet/Parchment.class new file mode 100644 index 0000000000000000000000000000000000000000..86556df406b4d54232a077eef174b5f065142313 GIT binary patch literal 541 zcmZ9I%}xR_6opTjVPJ-F`0-zK;SN|h8+RHKV?shg)I`IAT^SlEff+Ltp304h#>9mW z;6oX2%LIvO()Qka?zvz4{qy++;1XvAJ-8k}E;sfWf(zu~cmayU}g->9|cs!h?k!A1(q0tI_PcAafsi zI1J^UjK$q@J{0K_AI`|8)=MHj>+@9VI7`}UA{V;$pY)0$7z@?i=As!yW;X`wQO7*ZP3ps=uTB zYP40_1LHuSNPRA?8s!d1PipL9k4}Bl?(}Qer`p;xG%=8Gy`lU4s4EjYFtt~a$F>S3W%Mh z14vXz42%r?DB!#or!jP4@Voat-+Ruv=l=Zl?K^-+*tTH^xZ@-~k!kN>K{?`Oh$Dy)Uo=R4JK~zyw6R5pT#|t2)9JQ z8qWqQxXElCb!=jVInbOE;1g>ohJq+y6(~%r(zxJMc2v zenwlP=Ei$C46E<3V4a)i6f?E5tnJxEnUqzubBMJ}jIyFJ$94{8 KE^JFzb^id0LZK%B literal 0 HcmV?d00001 diff --git a/Projet/src/Resources/BeginningConversation.txt b/Projet/src/Resources/BeginningConversation.txt new file mode 100644 index 0000000..4817cf6 --- /dev/null +++ b/Projet/src/Resources/BeginningConversation.txt @@ -0,0 +1,8 @@ +Welcome to gameName created by Marc Léger, Camille Paquet, Michaël Parmentier, Mathieu Pereira. +You must travel across the France to discover a treasure. You can go in 17 cities like Paris, Bordeaux or Poitiers. +To know where you can find the treasure you need to find 5 parchments in differents places which will give you the path to follow. +So I don't even know your name. Could you give me your name dear stranger. +Fine ! Nice to meet you ! I give you a bag to carry your items and parchments. But you need some money to travel because the train or the airplane isn't free. +So I give you the incredible sum of 100 Donuts. It's forbidden to eat them ! +And today I'm sweet so I give you one ticket to take the train or the airplane. +Now leave me alone ! We are arrived to the City Hall of . \ No newline at end of file diff --git a/Projet/src/Resources/Conversation b/Projet/src/Resources/Conversation index 4be6fc5..a6e673b 100644 --- a/Projet/src/Resources/Conversation +++ b/Projet/src/Resources/Conversation @@ -1,17 +1,7 @@ -Welcome to gameName created by Marc Léger, Camille Paquet, Michaël Parmentier, Mathieu Pereira. -You must travel across the France to discover a treasure. You can go in 17 cities like Paris, Bordeaux or Poitiers. -To know where you can find the treasure you need to find 5 parchments in differents places which will give you the path to follow. -So I don't even know your name. Could you give your name dear stranger. -Fine ! Nice to meet you ! I give you a bag to carry your items and parchments. But you need some money to travel because the train or the airplane isn't free. -So I give you the incredible sum of 100 Donuts. It's forbidden to eat them ! -And today I'm sweet so I give you one ticket to take the train or the airplane. -Now leave me alone ! We are arrived to the City Hall of . - - Congrats ! You find 1 of 5 fragments parchments. Congrats ! You find 2 of 5 fragments parchments. Congrats ! You find 3 of 5 fragments parchments. Congrats ! You find 4 of 5 fragments parchments. CONGRATULATION ! You find all of the 5 fragments parchments. So now you have everything to take a treasure which gonna change your life ! -You've discovered the treasure ! It was so simple this time ! Try one more time maybe it will be simpler ! +You've discovered the treasure ! It was so simple this time ! Try one more time maybe it will be simpler ! \ No newline at end of file diff --git a/Projet/src/projet/Bag.java b/Projet/src/projet/Bag.java new file mode 100644 index 0000000..8846b71 --- /dev/null +++ b/Projet/src/projet/Bag.java @@ -0,0 +1,35 @@ +package projet; +import java.util.ArrayList; + +public class Bag { + + private final ArrayList bagItem; + private final ArrayList bagParchment; + private final static int NBR_TOTAL_PARCHMENT = 5; + + public Bag() { + this.bagItem = new ArrayList(); + this.bagParchment = new ArrayList(); + } + + public void addItem(Item item) { + this.bagItem.add(item); + } + + public void removeItem(Item item) { + this.bagItem.remove(item); + } + + public void addParchment(Parchment parchment) { + this.bagParchment.add(parchment); + } + + public boolean hasAllParchment() { + if(this.bagParchment.size() == Bag.NBR_TOTAL_PARCHMENT) { + return true; + } + else { + return false; + } + } +} diff --git a/Projet/src/projet/City.java b/Projet/src/projet/City.java new file mode 100644 index 0000000..c6c444f --- /dev/null +++ b/Projet/src/projet/City.java @@ -0,0 +1,124 @@ +package projet; +import java.io.File; +import java.io.FileNotFoundException; +import java.util.ArrayList; +import java.util.NoSuchElementException; +import java.util.Scanner; + +public class City { + + private final String name; + private final boolean hasAnAirport; + private ArrayList destination; + private ArrayList readDestination; + private final ArrayList placeList; + + private String cityName; + private String cityDestination1, cityDestination2, cityDestination3; + private String destinationString; + + public City(String name, boolean hasAnAirport, int idIndex) { + this.name = name; + this.hasAnAirport = hasAnAirport; + this.destination = this.readDestination(idIndex); + placeList = new ArrayList(); + } + + public String getName() { + return this.name; + } + + public boolean hasAnAirport() { + return this.hasAnAirport; + } + + public ArrayList getDestination() { + return this.destination; + } + + public String getDescription() { + for(String e : destination) { + this.destinationString += " | " + e; + } + if(this.hasAnAirport) { + return "You are in " + this.name + " !" + "\n" + "There is an airport and a train station in this city \n" + "You can go to : " + this.destinationString; + } + else { + return "You are in " + this.name + " !" + "\n" + "There is no airport but a train station in this city \n" + "You can go to : " + this.destinationString; + } + + } + + public City getCity() { + return this; + } + + public Place getPlace(String placeName) { + for(Place place : this.placeList) { + if(place.getPlaceName() == placeName) + { + return place; + } + } + return placeList.get(0); + } + + public void createPlace() { + placeList.add(new Place("City-Hall", null)); + placeList.add(new Place("Park", null)); + placeList.add(new Place("Mall", null)); + placeList.add(new Place("Museum", null)); + placeList.add(new Place("Train-station", null)); + placeList.add(new Place("Airport", null)); + placeList.add(new Place("Parking", null)); + } + + public ArrayList readDestination(int idIndex) { + + readDestination = new ArrayList(); + + try { + File f = new File("src/Resources/CityDestination.txt"); + Scanner scanner = new Scanner(f); + + try { + for(int i = 0; i < idIndex; i++) { + scanner.nextLine(); + } + + this.cityName = scanner.next(); + //3 Cities + if(this.cityName.equals("Paris")) { + this.cityDestination1 = scanner.next(); + this.cityDestination2 = scanner.next(); + this.cityDestination3 = scanner.next(); + } + //1 City + else if(this.cityName.equals("Nice") || this.cityName.equals("Brest")) { + this.cityDestination1 = scanner.next(); + this.cityDestination2 = ""; + this.cityDestination3 = ""; + } + //2 Cities + else + { + this.cityDestination1 = scanner.next(); + this.cityDestination2 = scanner.next(); + this.cityDestination3 = ""; + } + this.readDestination.add(this.cityDestination1); + this.readDestination.add(this.cityDestination2); + this.readDestination.add(this.cityDestination3); + + scanner.close(); + } + catch(NoSuchElementException e) { + + } + } + catch (FileNotFoundException e) { + System.out.println("Fichier introuvable"); + } + return this.readDestination; + } +} diff --git a/Projet/src/projet/Command.java b/Projet/src/projet/Command.java new file mode 100644 index 0000000..1c081dc --- /dev/null +++ b/Projet/src/projet/Command.java @@ -0,0 +1,8 @@ +package projet; + +public class Command { + + public Command() { + + } +} diff --git a/Projet/src/projet/Game.java b/Projet/src/projet/Game.java new file mode 100644 index 0000000..294fa14 --- /dev/null +++ b/Projet/src/projet/Game.java @@ -0,0 +1,85 @@ +package projet; +import java.io.File; +import java.util.ArrayList; +import java.util.Scanner; + +public class Game { + + private ArrayList listCity; + private Hero hero; + private String beginningText = ""; + + public Game() { + //Create ArrayList of City + this.createCity(); + + //Starting dialogue + this.startGame(); + + System.out.println(this.hero.getActualCity().getDescription()); + } + + public void startGame() { + try { + File f = new File("src/Resources/BeginningConversation.txt"); + Scanner scanner = new Scanner(f); + Scanner scannerIN = new Scanner(System.in); + + try { + for(int i = 0; i < 4; i++) { + this.beginningText += scanner.nextLine() + "\n"; + } + System.out.println(this.beginningText); + + //Initialization of the HERO + hero = new Hero(scannerIN.nextLine()); + + this.beginningText = ""; + + for(int i = 0; i < 4; i++) { + this.beginningText += scanner.nextLine() + "\n"; + } + } + catch (Exception e) { + System.out.println(e); + scanner.close(); + } + } + catch (Exception e) { + System.out.println(e); + } + + this.beginningText = this.beginningText.replace("", this.hero.getName()); + this.beginningText = this.beginningText.replace("", this.getDepartureCity().getName()); + System.out.println(this.beginningText); + } + + public void createCity() { + listCity = new ArrayList(); + listCity.add(new City("Paris", true, 0)); + listCity.add(new City("Marseille", true, 1)); + listCity.add(new City("Lyon", true, 2)); + listCity.add(new City("Bordeaux", true, 3)); + listCity.add(new City("Lille", false, 4)); + listCity.add(new City("Le Havre", false, 5)); + listCity.add(new City("Rennes", false, 6)); + listCity.add(new City("Strasbourg", false, 7)); + listCity.add(new City("La Rochelle", false, 8)); + listCity.add(new City("Nantes", false, 9)); + listCity.add(new City("Toulouse", false, 10)); + listCity.add(new City("Montpellier", false, 11)); + listCity.add(new City("Nice", false, 12)); + listCity.add(new City("Brest", false, 13)); + listCity.add(new City("Dijon", false, 14)); + listCity.add(new City("Poitiers", false, 15)); + listCity.add(new City("Reims", false, 16)); + } + + public City getDepartureCity() { + double randIndex; + randIndex = Math.random() * this.listCity.size(); + this.hero.setActualCity(this.listCity.get((int) randIndex)); + this.hero.setPlace("City-Hall"); + return this.listCity.get((int) randIndex); + } +} diff --git a/Projet/src/projet/Hero.java b/Projet/src/projet/Hero.java new file mode 100644 index 0000000..abfca13 --- /dev/null +++ b/Projet/src/projet/Hero.java @@ -0,0 +1,55 @@ +package projet; +import java.util.ArrayList; + +public class Hero { + + private final String name; + private int money; + private final static int MoneyDEF = 100; + private ArrayList alreadyVisitCity; + private City actualCity; + private Place actualPlace; + private Bag bag; + + public Hero(String name) { + this.name = name; + this.money = Hero.MoneyDEF; + bag = new Bag(); + } + + public int getMoney() { + return this.money; + } + + public void addMoney(int money) { + this.money += money; + } + + public String getName() { + return this.name; + } + + public Place getActualPlace() { + return this.actualPlace; + } + + public void setPlace(Place actualPlace) { + this.actualPlace = actualPlace; + } + + public void setPlace(String placeName) { + //this.actualPlace = + } + + public City getActualCity() { + return this.actualCity; + } + + public void setActualCity(City actualCity) { + this.actualCity = actualCity; + } + + public Bag getBag() { + return this.bag; + } +} diff --git a/Projet/src/projet/Item.java b/Projet/src/projet/Item.java new file mode 100644 index 0000000..8a3fe85 --- /dev/null +++ b/Projet/src/projet/Item.java @@ -0,0 +1,28 @@ +package projet; + +public class Item { + private final String name; + private final int quantity; + private boolean isActive; + + public Item(String name, int quantity) { + this.name = name; + this.quantity = quantity; + this.isActive = true; + } + + public String getDescription() { + return "Ceci est l'item : " + this.name; + } + + public int getQuantity() { + return this.quantity; + } + + public void isActive(boolean active) { + this.isActive = active; + } + public boolean isActive() { + return this.isActive; + } +} diff --git a/Projet/src/projet/ItemMoney.java b/Projet/src/projet/ItemMoney.java new file mode 100644 index 0000000..dfc8d18 --- /dev/null +++ b/Projet/src/projet/ItemMoney.java @@ -0,0 +1,18 @@ +package projet; + +public class ItemMoney extends Item { + + private final String name; + private final int quantity; + + public ItemMoney(String name, int quantity) { + super(name, quantity); + this.quantity = quantity; + this.name = name; + } + + public String getDescription() { + return this.name + " : " + this.quantity; + } + +} diff --git a/Projet/src/projet/ItemTicket.java b/Projet/src/projet/ItemTicket.java new file mode 100644 index 0000000..d729285 --- /dev/null +++ b/Projet/src/projet/ItemTicket.java @@ -0,0 +1,17 @@ +package projet; + +public class ItemTicket extends Item { + + private final String name; + private final int quantity; + + public ItemTicket(String name, int quantity) { + super(name, quantity); + this.name = name; + this.quantity = quantity; + } + + public String getDescription() { + return this.name + " : " + this.quantity; + } +} diff --git a/Projet/src/projet/Main.java b/Projet/src/projet/Main.java new file mode 100644 index 0000000..16ac66e --- /dev/null +++ b/Projet/src/projet/Main.java @@ -0,0 +1,9 @@ +package projet; + +public class Main { + + public static void main(String[] args) { + + Game game = new Game(); + } +} diff --git a/Projet/src/projet/NPC.java b/Projet/src/projet/NPC.java new file mode 100644 index 0000000..a52e665 --- /dev/null +++ b/Projet/src/projet/NPC.java @@ -0,0 +1,47 @@ +package projet; +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +//package projet; + +/** + * + * @author Camille + */ +public abstract class NPC { + private final String NAME; + private boolean isActive; + private Item ITEM; + private final String Question; + private final String Answer; + + public NPC(String name,Item item,String Question,String Answer){ + this.NAME=name; + this.isActive=true; + this.ITEM=item; + this.Question=Question; + this.Answer=Answer; + } + + public void give_Item(Hero hero){ + hero.getBag().addItem(this.ITEM); //POUVOIR RECUPERER LE SAC DU HERO dans le HERO pour ajouter element à son sac + this.ITEM=null; + } + + public void verifyAnswer(String answer){ + if(this.Answer.equals(answer)){ + this.isActive=false; + } + } + + public boolean isActive(){ + return this.isActive; + } + + + //faire plusieurs perso avec un pouvoir juste comme augmenter l'argent etc.. + +} + diff --git a/Projet/src/projet/Parchment.java b/Projet/src/projet/Parchment.java new file mode 100644 index 0000000..dc71669 --- /dev/null +++ b/Projet/src/projet/Parchment.java @@ -0,0 +1,18 @@ +package projet; +public class Parchment { + + private int idParchment; + private boolean isActive; + + public Parchment(int idParchment) { + this.idParchment = idParchment; + } + + public int getIdParchment() { + return this.idParchment; + } + + public void isActive(boolean active) { + this.isActive = active; + } +} diff --git a/Projet/src/projet/Place.java b/Projet/src/projet/Place.java new file mode 100644 index 0000000..4cca472 --- /dev/null +++ b/Projet/src/projet/Place.java @@ -0,0 +1,47 @@ +package projet; +public class Place { + + private final String name; + private final boolean hasNPC; + private final boolean hasMoney; + private final boolean hasParchment; + + public Place(String name, NPC npc) { + this.name = name; + if(npc != null) { + this.hasNPC = true; + } + else { + this.hasNPC = false; + } + //Here function to randomise if there are Money nor parchment on the place + this.hasMoney = false; + this.hasParchment = false; + } + + public String getPlaceName() { + return this.name; + } + + //Useless + public Place getPlace() { + return this; + } + + public String getDescription() { + return this.name; + } + + public boolean hasObject() { + if(this.hasMoney || this.hasParchment) { + return true; + } + else { + return false; + } + } + + public boolean hasNPC() { + return this.hasNPC; + } +}