From 02c7b31cb0af2b595249f9e18769c676004a1f4d Mon Sep 17 00:00:00 2001 From: ZIRTR0X <76250995+ZIRTR0X@users.noreply.github.com> Date: Sat, 27 Nov 2021 09:58:32 +0100 Subject: [PATCH] Ajout des classes + structure projet Ajout des classes : - Joueur - Partie - Plateau - Case - Avatar - CaseEvenement - CaseChance - CaseMalchance --- README.md | 4 +- code/.idea/.gitignore | 112 ++++++ code/.idea/compiler.xml | 23 ++ code/.idea/description.html | 2 + code/.idea/encodings.xml | 6 + code/.idea/gradle.xml | 4 + code/.idea/libraries/lib.xml | 13 + code/.idea/misc.xml | 9 + code/.idea/modules.xml | 8 + code/.idea/uiDesigner.xml | 125 +++++++ code/.idea/vcs.xml | 6 + code/.idea/workspace.xml | 348 ++++++++++++++++++ code/code.iml | 12 + code/out/production/code/launcher/Main.class | Bin 0 -> 255 bytes code/out/production/code/model/Joueur.class | Bin 0 -> 947 bytes code/out/production/code/model/Partie.class | Bin 0 -> 1037 bytes .../production/code/sample/Controller.class | Bin 0 -> 269 bytes code/out/production/code/sample/Main.class | Bin 0 -> 1200 bytes code/out/production/code/sample/sample.fxml | 8 + code/src/launcher/Main.java | 4 + code/src/model/Avatar.java | 27 ++ code/src/model/Case.java | 57 +++ code/src/model/CaseChance.java | 18 + code/src/model/CaseEvenement.java | 18 + code/src/model/CaseMalchance.java | 18 + code/src/model/Joueur.java | 37 ++ code/src/model/Partie.java | 38 ++ code/src/model/Plateau.java | 37 ++ code/src/sample/Controller.java | 4 + code/src/sample/Main.java | 23 ++ code/src/sample/sample.fxml | 8 + 31 files changed, 967 insertions(+), 2 deletions(-) create mode 100644 code/.idea/.gitignore create mode 100644 code/.idea/compiler.xml create mode 100644 code/.idea/description.html create mode 100644 code/.idea/encodings.xml create mode 100644 code/.idea/gradle.xml create mode 100644 code/.idea/libraries/lib.xml create mode 100644 code/.idea/misc.xml create mode 100644 code/.idea/modules.xml create mode 100644 code/.idea/uiDesigner.xml create mode 100644 code/.idea/vcs.xml create mode 100644 code/.idea/workspace.xml create mode 100644 code/code.iml create mode 100644 code/out/production/code/launcher/Main.class create mode 100644 code/out/production/code/model/Joueur.class create mode 100644 code/out/production/code/model/Partie.class create mode 100644 code/out/production/code/sample/Controller.class create mode 100644 code/out/production/code/sample/Main.class create mode 100644 code/out/production/code/sample/sample.fxml create mode 100644 code/src/launcher/Main.java create mode 100644 code/src/model/Avatar.java create mode 100644 code/src/model/Case.java create mode 100644 code/src/model/CaseChance.java create mode 100644 code/src/model/CaseEvenement.java create mode 100644 code/src/model/CaseMalchance.java create mode 100644 code/src/model/Joueur.java create mode 100644 code/src/model/Partie.java create mode 100644 code/src/model/Plateau.java create mode 100644 code/src/sample/Controller.java create mode 100644 code/src/sample/Main.java create mode 100644 code/src/sample/sample.fxml diff --git a/README.md b/README.md index d2e0514..697816d 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# ProjetJavaFX - +# projetJavaFX +/ diff --git a/code/.idea/.gitignore b/code/.idea/.gitignore new file mode 100644 index 0000000..d8de5f9 --- /dev/null +++ b/code/.idea/.gitignore @@ -0,0 +1,112 @@ + +# Created by https://www.toptal.com/developers/gitignore/api/intellij +# Edit at https://www.toptal.com/developers/gitignore?templates=intellij + +### Intellij ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### Intellij Patch ### +# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 + +# *.iml +# modules.xml +# .idea/misc.xml +# *.ipr + +# Sonarlint plugin +# https://plugins.jetbrains.com/plugin/7973-sonarlint +.idea/**/sonarlint/ + +# SonarQube Plugin +# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin +.idea/**/sonarIssues.xml + +# Markdown Navigator plugin +# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced +.idea/**/markdown-navigator.xml +.idea/**/markdown-navigator-enh.xml +.idea/**/markdown-navigator/ + +# Cache file creation bug +# See https://youtrack.jetbrains.com/issue/JBR-2257 +.idea/$CACHE_FILE$ + +# CodeStream plugin +# https://plugins.jetbrains.com/plugin/12206-codestream +.idea/codestream.xml + +# End of https://www.toptal.com/developers/gitignore/api/intellij + diff --git a/code/.idea/compiler.xml b/code/.idea/compiler.xml new file mode 100644 index 0000000..217af47 --- /dev/null +++ b/code/.idea/compiler.xml @@ -0,0 +1,23 @@ + + + + + + diff --git a/code/.idea/description.html b/code/.idea/description.html new file mode 100644 index 0000000..cc10d56 --- /dev/null +++ b/code/.idea/description.html @@ -0,0 +1,2 @@ +Simple JavaFX 2.0 application that includes simple .fxml file with attached controller and Main class to quick start. Artifact to build JavaFX application is provided. + \ No newline at end of file diff --git a/code/.idea/encodings.xml b/code/.idea/encodings.xml new file mode 100644 index 0000000..97626ba --- /dev/null +++ b/code/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/code/.idea/gradle.xml b/code/.idea/gradle.xml new file mode 100644 index 0000000..3e3960b --- /dev/null +++ b/code/.idea/gradle.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/code/.idea/libraries/lib.xml b/code/.idea/libraries/lib.xml new file mode 100644 index 0000000..d6c456e --- /dev/null +++ b/code/.idea/libraries/lib.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/code/.idea/misc.xml b/code/.idea/misc.xml new file mode 100644 index 0000000..2dcb725 --- /dev/null +++ b/code/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/code/.idea/modules.xml b/code/.idea/modules.xml new file mode 100644 index 0000000..fc53374 --- /dev/null +++ b/code/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/code/.idea/uiDesigner.xml b/code/.idea/uiDesigner.xml new file mode 100644 index 0000000..3b00020 --- /dev/null +++ b/code/.idea/uiDesigner.xml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/code/.idea/vcs.xml b/code/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/code/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/code/.idea/workspace.xml b/code/.idea/workspace.xml new file mode 100644 index 0000000..17aa281 --- /dev/null +++ b/code/.idea/workspace.xml @@ -0,0 +1,348 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + localhost + 5050 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1359379246138 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/code/code.iml b/code/code.iml new file mode 100644 index 0000000..fb8e866 --- /dev/null +++ b/code/code.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/code/out/production/code/launcher/Main.class b/code/out/production/code/launcher/Main.class new file mode 100644 index 0000000000000000000000000000000000000000..2e9196debb1e0e45e375184e96f953e0fa82a52a GIT binary patch literal 255 zcmY+8y9&ZU5Jm6gX<~ffAK0mdDJ>Km!OBOW*l*&ZD{%uc@xQDD3qQb*5@*H68Mw?n zGZ*Idemnt;&<*OTU s5?xsQq$%R&5Ua;7{(8V2+(9=67JOEZF*s0TjlQ#s03ka6G$;p9!6 z>NHVMeTB;BxlSkX?CVrB(c}O5I8OB2;ERI$Dx8Ij3vN37UjKZk;Pm1N>l%Y_rr)L0 zkxo7aqllT^K|BtkVUUD!UL~Eyr*N)NA55u=x>?(o3e_vU=&xPaopbuAG4~;7g;|=B z%FDH%>O8M=I>u6s$-L0%^u(#u-YP4XahirlK_Gb7KhgPXvEhcgc)ls#;t;-QMN zf|oa}up^b-D41P!-;b{Kc%eXhLmYFiE+=mDBY_bDF)KM-OCSt2#yU?CEI3^6`#+)l z))JQAUc&YdmTfWFzaV}+`}$UB$>X-?4;H*JLzq+XOsW4 z&RwojwdMbS^^KdXm1~j>gZ8q56|`U9`nPwGCk}t6Go6U5!QIF&j`L^I(3aAYq%_bX#~{390qO>X6e$9vM%g>*sJLsQiC^d@M>rCt8^mY#;UKnG5uVP z(u0Q+4`oz5)K#dWCg80$C(zVGPomjH_bNQAwKN1+B>h($(*D?sh z9mWPv2`o5VcY_}gL2C&s=qzCe&z5k$F>hguagS8RaY(AtRD*;aGMdZ=rXF{(%@avl zSLmHmw)9SE+tl3Qf1@07RkupPcUWJzF;cEhHZ|Ha7jm?~JsP=P?0j7--rZPyf1|R! zuDrjocpnG3@+p0)mRvoo|06PuwmGPdChVD8*JE+>u?Rds>lW+jjd2^+5n0^=mKv-Y YUwgAJd)?PDStkW7^)!mr(PKRP3!pTXfdBvi literal 0 HcmV?d00001 diff --git a/code/out/production/code/sample/Controller.class b/code/out/production/code/sample/Controller.class new file mode 100644 index 0000000000000000000000000000000000000000..d9c917c8db078f872487fab60b15b7547a307063 GIT binary patch literal 269 zcmZXO&5FW65QM8^el$kou20}iJ(!~h#f#u6=wTP{lQ`(en2|C1UVB>b-~;SKi5(I4 zU^f(9ReaEY_v;P77@ZI`v;wpP!~}n;3RTVswf+5z7$4h z9G?AAj(3yNmKk1l@7~;V&$)N+=I_5>e*ny3Lq$KvRZO6mz@&;POsmi_qu^cw_f^c| zfr5wel6ywsK)m#2CNNYa@koB2lgncj89Y(&RKYw$e8IF$e~}?l7~f%tE<1aIA!V4h z*f^@~3U{0DTI9(XPK8@L+%@I7>5TdZrpM4@c)V7(gkI*RO*vzp&t0EkpkN&GuYCVl zCr4H2TXLP3G+Ny?Yux=Fco?#m#gQ1-aVSl$^|c~wp}*sA?wgM7DOjNJ z8qqW43!ejkZgIOxoUUnC1JWpWtE9I7lFyWE%Qo)H#&r{9Q+Pq67)Ha}z1Ze3k1c%t{iZ=l@=d+6Vfxy~vSB!UPq=hh z78&g%=ZH=rp;AiH>Q#G+NWUliZPS<6mAgy{P1#_3{yJ`Ceq}|Dpu`7lzc8mkT;L8z z#yfDn(Ic_=kzF~!2)&&C;7LV5Q;Qs}c{=N~GumSlCtyFx=)wT4@xYnH6|%K309P?c zCx&adPEiv40|`WEpPFc(D-&rTdWzT?;^ksSX&_PjjpV1vEYvKt6ZAHaDmIXAljIR2 za1YYxrF1D2$eKi7Ksp>IZjurOZeWPW)3o2jFbNnTY?M5s^ozKKF|wqjS=z&TPSMw< XQV9SmI!ZyEHQmM?@-y6}wF`y+WD*YL literal 0 HcmV?d00001 diff --git a/code/out/production/code/sample/sample.fxml b/code/out/production/code/sample/sample.fxml new file mode 100644 index 0000000..363237a --- /dev/null +++ b/code/out/production/code/sample/sample.fxml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/code/src/launcher/Main.java b/code/src/launcher/Main.java new file mode 100644 index 0000000..c14124d --- /dev/null +++ b/code/src/launcher/Main.java @@ -0,0 +1,4 @@ +package launcher; + +public class Main { +} diff --git a/code/src/model/Avatar.java b/code/src/model/Avatar.java new file mode 100644 index 0000000..0ec5b66 --- /dev/null +++ b/code/src/model/Avatar.java @@ -0,0 +1,27 @@ +package model; + +public class Avatar { + int idAvatar; + char image; + + public Avatar(int idAvatar, char image) { + this.idAvatar = idAvatar; + this.image = image; + } + + public int getIdAvatar() { + return idAvatar; + } + + public char getImage() { + return image; + } + + public void setIdAvatar(int idAvatar) { + this.idAvatar = idAvatar; + } + + public void setImage(char image) { + this.image = image; + } +} diff --git a/code/src/model/Case.java b/code/src/model/Case.java new file mode 100644 index 0000000..b868a6b --- /dev/null +++ b/code/src/model/Case.java @@ -0,0 +1,57 @@ +package model; + +public class Case { + int idCase; + int coordX; + int coordY; + boolean isStart; + boolean isEnd; + + public Case(int idCase, int coordX, int coordY, boolean isStart, boolean isEnd) { + this.idCase = idCase; + this.coordX = coordX; + this.coordY = coordY; + this.isStart = isStart; + this.isEnd = isEnd; + } + + public int getIdCase() { + return idCase; + } + + public int getCoordX() { + return coordX; + } + + public int getCoordY() { + return coordY; + } + + public boolean isStart() { + return isStart; + } + + public boolean isEnd() { + return isEnd; + } + + public void setIdCase(int idCase) { + this.idCase = idCase; + } + + public void setCoordX(int coordX) { + this.coordX = coordX; + } + + public void setCoordY(int coordY) { + this.coordY = coordY; + } + + public void setStart(boolean start) { + isStart = start; + } + + public void setEnd(boolean end) { + isEnd = end; + } +} diff --git a/code/src/model/CaseChance.java b/code/src/model/CaseChance.java new file mode 100644 index 0000000..5d832f6 --- /dev/null +++ b/code/src/model/CaseChance.java @@ -0,0 +1,18 @@ +package model; + +public class CaseChance extends Case{ + char bonus; + + public CaseChance(int idCase, int coordX, int coordY, boolean isStart, boolean isEnd, char bonus) { + super(idCase, coordX, coordY, isStart, isEnd); + this.bonus = bonus; + } + + public char getBonus() { + return bonus; + } + + public void setBonus(char bonus) { + this.bonus = bonus; + } +} diff --git a/code/src/model/CaseEvenement.java b/code/src/model/CaseEvenement.java new file mode 100644 index 0000000..2959059 --- /dev/null +++ b/code/src/model/CaseEvenement.java @@ -0,0 +1,18 @@ +package model; + +public class CaseEvenement extends Case{ + char evenement; + + public CaseEvenement(int idCase, int coordX, int coordY, boolean isStart, boolean isEnd, char evenement) { + super(idCase, coordX, coordY, isStart, isEnd); + this.evenement = evenement; + } + + public char getEvenement() { + return evenement; + } + + public void setEvenement(char evenement) { + this.evenement = evenement; + } +} diff --git a/code/src/model/CaseMalchance.java b/code/src/model/CaseMalchance.java new file mode 100644 index 0000000..893956f --- /dev/null +++ b/code/src/model/CaseMalchance.java @@ -0,0 +1,18 @@ +package model; + +public class CaseMalchance extends Case{ + char malus; + + public CaseMalchance(int idCase, int coordX, int coordY, boolean isStart, boolean isEnd, char malus) { + super(idCase, coordX, coordY, isStart, isEnd); + this.malus = malus; + } + + public char getMalus() { + return malus; + } + + public void setMalus(char malus) { + this.malus = malus; + } +} diff --git a/code/src/model/Joueur.java b/code/src/model/Joueur.java new file mode 100644 index 0000000..4974c20 --- /dev/null +++ b/code/src/model/Joueur.java @@ -0,0 +1,37 @@ +package model; + +public class Joueur { + int idJoueur; + char pseudonyme; + int scoreMax; + + public Joueur(int idJoueur, char pseudonyme, int scoreMax) { + this.idJoueur = idJoueur; + this.pseudonyme = pseudonyme; + this.scoreMax = scoreMax; + } + + public int getIdJoueur() { + return idJoueur; + } + + public char getPseudonyme() { + return pseudonyme; + } + + public int getScoreMax() { + return scoreMax; + } + + public void setIdJoueur(int idJoueur) { + this.idJoueur = idJoueur; + } + + public void setPseudonyme(char pseudonyme) { + this.pseudonyme = pseudonyme; + } + + public void setScoreMax(int scoreMax) { + this.scoreMax = scoreMax; + } +} diff --git a/code/src/model/Partie.java b/code/src/model/Partie.java new file mode 100644 index 0000000..9583d24 --- /dev/null +++ b/code/src/model/Partie.java @@ -0,0 +1,38 @@ +package model; +import java.time.LocalDateTime; + +public class Partie { + int idPartie; + LocalDateTime temps; + int scorePartie; + + public Partie(int idPartie, LocalDateTime temps, int scorePartie) { + this.idPartie = idPartie; + this.scorePartie = scorePartie; + this.temps = temps; + } + + public int getIdPartie() { + return idPartie; + } + + public LocalDateTime getTemps() { + return temps; + } + + public int getScorePartie() { + return scorePartie; + } + + public void setIdPartie(int idPartie) { + this.idPartie = idPartie; + } + + public void setTemps(LocalDateTime temps) { + this.temps = temps; + } + + public void setScorePartie(int scorePartie) { + this.scorePartie = scorePartie; + } +} diff --git a/code/src/model/Plateau.java b/code/src/model/Plateau.java new file mode 100644 index 0000000..c6714a3 --- /dev/null +++ b/code/src/model/Plateau.java @@ -0,0 +1,37 @@ +package model; + +public class Plateau { + int idPlateau; + int taille; + int difficulte; + + public Plateau(int idPlateau, int taille, int difficulte) { + this.idPlateau = idPlateau; + this.taille = taille; + this.difficulte = difficulte; + } + + public int getIdPlateau() { + return idPlateau; + } + + public int getTaille() { + return taille; + } + + public int getDifficulte() { + return difficulte; + } + + public void setIdPlateau(int idPlateau) { + this.idPlateau = idPlateau; + } + + public void setTaille(int taille) { + this.taille = taille; + } + + public void setDifficulte(int difficulte) { + this.difficulte = difficulte; + } +} diff --git a/code/src/sample/Controller.java b/code/src/sample/Controller.java new file mode 100644 index 0000000..54e5bd1 --- /dev/null +++ b/code/src/sample/Controller.java @@ -0,0 +1,4 @@ +package sample; + +public class Controller { +} diff --git a/code/src/sample/Main.java b/code/src/sample/Main.java new file mode 100644 index 0000000..5333744 --- /dev/null +++ b/code/src/sample/Main.java @@ -0,0 +1,23 @@ +package sample; + +import javafx.application.Application; +import javafx.fxml.FXMLLoader; +import javafx.scene.Parent; +import javafx.scene.Scene; +import javafx.stage.Stage; + +public class Main extends Application { + + @Override + public void start(Stage primaryStage) throws Exception{ + Parent root = FXMLLoader.load(getClass().getResource("sample.fxml")); + primaryStage.setTitle("Hello World"); + primaryStage.setScene(new Scene(root, 300, 275)); + primaryStage.show(); + } + + + public static void main(String[] args) { + launch(args); + } +} diff --git a/code/src/sample/sample.fxml b/code/src/sample/sample.fxml new file mode 100644 index 0000000..363237a --- /dev/null +++ b/code/src/sample/sample.fxml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file