diff --git a/Partie_3_GUI/pom.xml b/Partie_3_GUI/pom.xml index 94844ab553712ae4495252c282221d4b6a0e764e..f9ba57c9809ce94cfe27ec38a6bec75280bda25e 100644 --- a/Partie_3_GUI/pom.xml +++ b/Partie_3_GUI/pom.xml @@ -1,14 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> - <groupId>ch.hepia</groupId> <artifactId>Java_Card_Game</artifactId> + <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> - <name>Java_Card_Game</name> - <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.source>20</maven.compiler.source> @@ -41,9 +40,8 @@ </dependencies> <build> - <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) --> + <pluginManagement> <plugins> - <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle --> <plugin> <artifactId>maven-clean-plugin</artifactId> <version>3.1.0</version> @@ -53,6 +51,7 @@ <version>3.8.0</version> </plugin> <plugin> + <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.22.1</version> </plugin> diff --git a/Partie_3_GUI/src/test/java/ch/hepia/JoueurTest.java b/Partie_3_GUI/src/test/java/ch/hepia/JoueurTest.java index 836b221b5da855987b44520d0ab78f2c53aad800..a5276bc450d785cec73d2b2b0ed83b7ff6e71507 100644 --- a/Partie_3_GUI/src/test/java/ch/hepia/JoueurTest.java +++ b/Partie_3_GUI/src/test/java/ch/hepia/JoueurTest.java @@ -1,12 +1,14 @@ package ch.hepia; -import static org.junit.Assert.*; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.io.ByteArrayOutputStream; import java.io.PrintStream; -import org.junit.Test; - public class JoueurTest { @Test diff --git a/Partie_3_GUI/target/Java_Card_Game-1.0-SNAPSHOT.jar b/Partie_3_GUI/target/Java_Card_Game-1.0-SNAPSHOT.jar new file mode 100644 index 0000000000000000000000000000000000000000..6bcf73e5fafbe10707a17d73f4b2f824a9c3901c Binary files /dev/null and b/Partie_3_GUI/target/Java_Card_Game-1.0-SNAPSHOT.jar differ diff --git a/Partie_3_GUI/target/classes/ch/hepia/BlackjackGUI$1.class b/Partie_3_GUI/target/classes/ch/hepia/BlackjackGUI$1.class index dfb5471cba8b04ad6653a41ecd555366c06feec5..9ff25729f7579aedf8ab30375c5973a07af7109e 100644 Binary files a/Partie_3_GUI/target/classes/ch/hepia/BlackjackGUI$1.class and b/Partie_3_GUI/target/classes/ch/hepia/BlackjackGUI$1.class differ diff --git a/Partie_3_GUI/target/classes/ch/hepia/BlackjackGUI.class b/Partie_3_GUI/target/classes/ch/hepia/BlackjackGUI.class index 6fe366d35383b346eafd305a8fc28ad162058b8a..8ee7e93d237978efad496f9ce73fb34732281f78 100644 Binary files a/Partie_3_GUI/target/classes/ch/hepia/BlackjackGUI.class and b/Partie_3_GUI/target/classes/ch/hepia/BlackjackGUI.class differ diff --git a/Partie_3_GUI/target/classes/ch/hepia/GameManager$1.class b/Partie_3_GUI/target/classes/ch/hepia/GameManager$1.class index 35904b8df7ab6a76c55e5d1e7abc30e5863ea0d3..248e57a7702d920825c172dd289d7e6c9a3af60f 100644 Binary files a/Partie_3_GUI/target/classes/ch/hepia/GameManager$1.class and b/Partie_3_GUI/target/classes/ch/hepia/GameManager$1.class differ diff --git a/Partie_3_GUI/target/classes/ch/hepia/GameManager.class b/Partie_3_GUI/target/classes/ch/hepia/GameManager.class index 52570a3f5d1db32a7353a8a3b3e82ef9cf5ff9ac..b7008a18328c7482d9d74e4e02ea4def78a3ee45 100644 Binary files a/Partie_3_GUI/target/classes/ch/hepia/GameManager.class and b/Partie_3_GUI/target/classes/ch/hepia/GameManager.class differ diff --git a/Partie_3_GUI/target/maven-archiver/pom.properties b/Partie_3_GUI/target/maven-archiver/pom.properties new file mode 100644 index 0000000000000000000000000000000000000000..c65f8f481853a956fc3e72255baa0856ed412825 --- /dev/null +++ b/Partie_3_GUI/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Fri Jan 19 10:30:00 CET 2024 +artifactId=Java_Card_Game +groupId=ch.hepia +version=1.0-SNAPSHOT diff --git a/Partie_3_GUI/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst b/Partie_3_GUI/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst new file mode 100644 index 0000000000000000000000000000000000000000..9241e0b77e7df9563fb461ce4c81a972b82ce9ea --- /dev/null +++ b/Partie_3_GUI/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst @@ -0,0 +1 @@ +ch/hepia/JoueurTest.class diff --git a/Partie_3_GUI/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/Partie_3_GUI/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst new file mode 100644 index 0000000000000000000000000000000000000000..224ea3f86047ddd2ece87acc64d6846932b895c0 --- /dev/null +++ b/Partie_3_GUI/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst @@ -0,0 +1 @@ +/home/padi/Git/java-card-game/Partie_3_GUI/src/test/java/ch/hepia/JoueurTest.java diff --git a/Partie_3_GUI/target/surefire-reports/TEST-ch.hepia.JoueurTest.xml b/Partie_3_GUI/target/surefire-reports/TEST-ch.hepia.JoueurTest.xml new file mode 100644 index 0000000000000000000000000000000000000000..839aa9343ab51b0fc4cd3d7efe5a2ea041474675 --- /dev/null +++ b/Partie_3_GUI/target/surefire-reports/TEST-ch.hepia.JoueurTest.xml @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="UTF-8"?> +<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd" name="ch.hepia.JoueurTest" time="0.039" tests="29" errors="0" skipped="0" failures="0"> + <properties> + <property name="java.specification.version" value="20"/> + <property name="sun.jnu.encoding" value="UTF-8"/> + <property name="java.class.path" value="/home/padi/Git/java-card-game/Partie_3_GUI/target/test-classes:/home/padi/Git/java-card-game/Partie_3_GUI/target/classes:/home/padi/.m2/repository/junit/junit/4.13.2/junit-4.13.2.jar:/home/padi/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/home/padi/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.9.1/junit-jupiter-engine-5.9.1.jar:/home/padi/.m2/repository/org/junit/platform/junit-platform-engine/1.9.1/junit-platform-engine-1.9.1.jar:/home/padi/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/home/padi/.m2/repository/org/junit/platform/junit-platform-commons/1.9.1/junit-platform-commons-1.9.1.jar:/home/padi/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.9.1/junit-jupiter-api-5.9.1.jar:/home/padi/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/home/padi/.m2/repository/com/opencsv/opencsv/5.9/opencsv-5.9.jar:/home/padi/.m2/repository/org/apache/commons/commons-lang3/3.13.0/commons-lang3-3.13.0.jar:/home/padi/.m2/repository/org/apache/commons/commons-text/1.11.0/commons-text-1.11.0.jar:/home/padi/.m2/repository/commons-beanutils/commons-beanutils/1.9.4/commons-beanutils-1.9.4.jar:/home/padi/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/home/padi/.m2/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar:/home/padi/.m2/repository/org/apache/commons/commons-collections4/4.4/commons-collections4-4.4.jar:/home/padi/.m2/repository/org/openjfx/javafx-controls/21.0.1/javafx-controls-21.0.1.jar:/home/padi/.m2/repository/org/openjfx/javafx-controls/21.0.1/javafx-controls-21.0.1-linux.jar:/home/padi/.m2/repository/org/openjfx/javafx-graphics/21.0.1/javafx-graphics-21.0.1.jar:/home/padi/.m2/repository/org/openjfx/javafx-graphics/21.0.1/javafx-graphics-21.0.1-linux.jar:/home/padi/.m2/repository/org/openjfx/javafx-base/21.0.1/javafx-base-21.0.1.jar:/home/padi/.m2/repository/org/openjfx/javafx-base/21.0.1/javafx-base-21.0.1-linux.jar:"/> + <property name="java.vm.vendor" value="Oracle Corporation"/> + <property name="sun.arch.data.model" value="64"/> + <property name="java.vendor.url" value="https://java.oracle.com/"/> + <property name="os.name" value="Linux"/> + <property name="java.vm.specification.version" value="20"/> + <property name="sun.java.launcher" value="SUN_STANDARD"/> + <property name="user.country" value="CH"/> + <property name="sun.boot.library.path" value="/usr/lib/jvm/jdk-20/lib"/> + <property name="sun.java.command" value="/home/padi/Git/java-card-game/Partie_3_GUI/target/surefire/surefirebooter6655738418502678369.jar /home/padi/Git/java-card-game/Partie_3_GUI/target/surefire 2024-01-19T10-30-23_609-jvmRun1 surefire6809565385465670309tmp surefire_015345590288319503322tmp"/> + <property name="jdk.debug" value="release"/> + <property name="surefire.test.class.path" value="/home/padi/Git/java-card-game/Partie_3_GUI/target/test-classes:/home/padi/Git/java-card-game/Partie_3_GUI/target/classes:/home/padi/.m2/repository/junit/junit/4.13.2/junit-4.13.2.jar:/home/padi/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/home/padi/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.9.1/junit-jupiter-engine-5.9.1.jar:/home/padi/.m2/repository/org/junit/platform/junit-platform-engine/1.9.1/junit-platform-engine-1.9.1.jar:/home/padi/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/home/padi/.m2/repository/org/junit/platform/junit-platform-commons/1.9.1/junit-platform-commons-1.9.1.jar:/home/padi/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.9.1/junit-jupiter-api-5.9.1.jar:/home/padi/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/home/padi/.m2/repository/com/opencsv/opencsv/5.9/opencsv-5.9.jar:/home/padi/.m2/repository/org/apache/commons/commons-lang3/3.13.0/commons-lang3-3.13.0.jar:/home/padi/.m2/repository/org/apache/commons/commons-text/1.11.0/commons-text-1.11.0.jar:/home/padi/.m2/repository/commons-beanutils/commons-beanutils/1.9.4/commons-beanutils-1.9.4.jar:/home/padi/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/home/padi/.m2/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar:/home/padi/.m2/repository/org/apache/commons/commons-collections4/4.4/commons-collections4-4.4.jar:/home/padi/.m2/repository/org/openjfx/javafx-controls/21.0.1/javafx-controls-21.0.1.jar:/home/padi/.m2/repository/org/openjfx/javafx-controls/21.0.1/javafx-controls-21.0.1-linux.jar:/home/padi/.m2/repository/org/openjfx/javafx-graphics/21.0.1/javafx-graphics-21.0.1.jar:/home/padi/.m2/repository/org/openjfx/javafx-graphics/21.0.1/javafx-graphics-21.0.1-linux.jar:/home/padi/.m2/repository/org/openjfx/javafx-base/21.0.1/javafx-base-21.0.1.jar:/home/padi/.m2/repository/org/openjfx/javafx-base/21.0.1/javafx-base-21.0.1-linux.jar:"/> + <property name="sun.cpu.endian" value="little"/> + <property name="user.home" value="/home/padi"/> + <property name="user.language" value="fr"/> + <property name="java.specification.vendor" value="Oracle Corporation"/> + <property name="java.version.date" value="2023-04-18"/> + <property name="java.home" value="/usr/lib/jvm/jdk-20"/> + <property name="file.separator" value="/"/> + <property name="basedir" value="/home/padi/Git/java-card-game/Partie_3_GUI"/> + <property name="java.vm.compressedOopsMode" value="Zero based"/> + <property name="line.separator" value=" "/> + <property name="java.specification.name" value="Java Platform API Specification"/> + <property name="java.vm.specification.vendor" value="Oracle Corporation"/> + <property name="surefire.real.class.path" value="/home/padi/Git/java-card-game/Partie_3_GUI/target/surefire/surefirebooter6655738418502678369.jar"/> + <property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/> + <property name="java.runtime.version" value="20.0.1+9-29"/> + <property name="user.name" value="padi"/> + <property name="stdout.encoding" value="UTF-8"/> + <property name="path.separator" value=":"/> + <property name="os.version" value="6.6.6-76060606-generic"/> + <property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/> + <property name="file.encoding" value="UTF-8"/> + <property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/> + <property name="localRepository" value="/home/padi/.m2/repository"/> + <property name="java.vendor.url.bug" value="https://bugreport.java.com/bugreport/"/> + <property name="java.io.tmpdir" value="/tmp"/> + <property name="java.version" value="20.0.1"/> + <property name="user.dir" value="/home/padi/Git/java-card-game/Partie_3_GUI"/> + <property name="os.arch" value="amd64"/> + <property name="java.vm.specification.name" value="Java Virtual Machine Specification"/> + <property name="native.encoding" value="UTF-8"/> + <property name="java.library.path" value="/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib"/> + <property name="java.vm.info" value="mixed mode, sharing"/> + <property name="stderr.encoding" value="UTF-8"/> + <property name="java.vendor" value="Oracle Corporation"/> + <property name="java.vm.version" value="20.0.1+9-29"/> + <property name="sun.io.unicode.encoding" value="UnicodeLittle"/> + <property name="java.class.version" value="64.0"/> + </properties> + <testcase name="testAddNegativeMoney" classname="ch.hepia.JoueurTest" time="0.014"/> + <testcase name="testShowHands" classname="ch.hepia.JoueurTest" time="0.001"/> + <testcase name="testSplitMax" classname="ch.hepia.JoueurTest" time="0.001"/> + <testcase name="testSplit" classname="ch.hepia.JoueurTest" time="0.001"/> + <testcase name="testCardStrength" classname="ch.hepia.JoueurTest" time="0"/> + <testcase name="testRemoveMoney" classname="ch.hepia.JoueurTest" time="0.001"/> + <testcase name="testCardCountWrongHand" classname="ch.hepia.JoueurTest" time="0.001"/> + <testcase name="testAddTooBigBet" classname="ch.hepia.JoueurTest" time="0.001"/> + <testcase name="testWrongShowHand" classname="ch.hepia.JoueurTest" time="0"/> + <testcase name="testAddMoney" classname="ch.hepia.JoueurTest" time="0"/> + <testcase name="testDrawCardWrongHand" classname="ch.hepia.JoueurTest" time="0.001"/> + <testcase name="testAddNegativeBet" classname="ch.hepia.JoueurTest" time="0.001"/> + <testcase name="testDrawCard" classname="ch.hepia.JoueurTest" time="0"/> + <testcase name="testNumberHands" classname="ch.hepia.JoueurTest" time="0.001"/> + <testcase name="testGetBetWrongHand" classname="ch.hepia.JoueurTest" time="0"/> + <testcase name="testShowHand" classname="ch.hepia.JoueurTest" time="0"/> + <testcase name="testCardCount" classname="ch.hepia.JoueurTest" time="0.001"/> + <testcase name="testHandStrength" classname="ch.hepia.JoueurTest" time="0"/> + <testcase name="testCanSplit" classname="ch.hepia.JoueurTest" time="0"/> + <testcase name="testCardStrengthWrongCard" classname="ch.hepia.JoueurTest" time="0"/> + <testcase name="testCardStrengthWrongHand" classname="ch.hepia.JoueurTest" time="0.001"/> + <testcase name="testAddBetWrongHand" classname="ch.hepia.JoueurTest" time="0"/> + <testcase name="testAddZeroMoney" classname="ch.hepia.JoueurTest" time="0"/> + <testcase name="testAddBet" classname="ch.hepia.JoueurTest" time="0.001"/> + <testcase name="testWrongHandStrength" classname="ch.hepia.JoueurTest" time="0.001"/> + <testcase name="testDoubled" classname="ch.hepia.JoueurTest" time="0"/> + <testcase name="testCantSplit" classname="ch.hepia.JoueurTest" time="0"/> + <testcase name="testRemoveZeroMoney" classname="ch.hepia.JoueurTest" time="0"/> + <testcase name="testRemoveNegativeMoney" classname="ch.hepia.JoueurTest" time="0.001"/> +</testsuite> \ No newline at end of file diff --git a/Partie_3_GUI/target/surefire-reports/ch.hepia.JoueurTest.txt b/Partie_3_GUI/target/surefire-reports/ch.hepia.JoueurTest.txt new file mode 100644 index 0000000000000000000000000000000000000000..0e2a68f4a8868efbfdd05b57017f5adf5524e2e0 --- /dev/null +++ b/Partie_3_GUI/target/surefire-reports/ch.hepia.JoueurTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: ch.hepia.JoueurTest +------------------------------------------------------------------------------- +Tests run: 29, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.039 s - in ch.hepia.JoueurTest diff --git a/Partie_3_GUI/target/test-classes/ch/hepia/JoueurTest.class b/Partie_3_GUI/target/test-classes/ch/hepia/JoueurTest.class index 6c1eb68d4853e00d11fada367c940922ce2fed72..ada1f39c4c63b5306d20133cf712dbacf3d9af40 100644 Binary files a/Partie_3_GUI/target/test-classes/ch/hepia/JoueurTest.class and b/Partie_3_GUI/target/test-classes/ch/hepia/JoueurTest.class differ diff --git a/README.md b/README.md index bab410f2b0467853e642644b9e51ba06f5a20f3c..c869d4692e6510bbd3f76ae8fe697102312e4fac 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,12 @@ Le but de ce projet est dans un premier temps de modéliser différents jeux de Les tests unitaires peuvent être trouvé sous `Partie_3_GUI/src/test/java/ch/hepia/JoueurTest.java` +et peuvent être exécuté comme suit : + +~~~cmd +❯ mvn test +~~~ + # Creators **Michael Divià**