Merge remote-tracking branch 'origin/Main' into PMD-Korrektur
commit
cf870fec57
|
@ -10,13 +10,12 @@
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
|
||||||
<name>schach</name>
|
<name>schach</name>
|
||||||
<description>A simple schach.</description>
|
<description>A simple schach project</description>
|
||||||
<url>http://www.example.com</url>
|
<url>http://www.example.com</url>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<maven.compiler.source>21</maven.compiler.source>
|
<maven.compiler.release>21</maven.compiler.release>
|
||||||
<maven.compiler.target>21</maven.compiler.target>
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
|
@ -27,22 +26,31 @@
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- Schachlib (bhlangonijr) -->
|
<!-- Schachlib -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.bhlangonijr</groupId>
|
<groupId>com.github.bhlangonijr</groupId>
|
||||||
<artifactId>chesslib</artifactId>
|
<artifactId>chesslib</artifactId>
|
||||||
<version>1.3.4</version>
|
<version>1.3.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- JUnit 3 (wie im Template, ggf. auf JUnit 4/5 upgraden für moderne Projekte) -->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.junit.jupiter</groupId>
|
<groupId>org.junit.jupiter</groupId>
|
||||||
<artifactId>junit-jupiter</artifactId>
|
<artifactId>junit-jupiter</artifactId>
|
||||||
<version>5.10.2</version>
|
<version>5.10.2</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
|
||||||
|
<!-- Mockito -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mockito</groupId>
|
||||||
|
<artifactId>mockito-core</artifactId>
|
||||||
|
<version>5.11.0</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
@ -83,12 +91,58 @@
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<!-- Java Compiler Plugin -->
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.13.0</version>
|
||||||
|
<configuration>
|
||||||
|
<release>21</release>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<!-- PMD Plugin -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-pmd-plugin</artifactId>
|
||||||
|
<version>3.21.0</version>
|
||||||
|
<configuration>
|
||||||
|
<!-- Set to 17 until PMD supports 21 -->
|
||||||
|
<targetJdk>17</targetJdk>
|
||||||
|
<failOnViolation>false</failOnViolation>
|
||||||
|
<printFailingErrors>true</printFailingErrors>
|
||||||
|
<linkXRef>false</linkXRef>
|
||||||
|
<rulesets>
|
||||||
|
<ruleset>rulesets/java/quickstart.xml</ruleset>
|
||||||
|
<ruleset>rulesets/java/basic.xml</ruleset>
|
||||||
|
<ruleset>rulesets/java/braces.xml</ruleset>
|
||||||
|
<ruleset>rulesets/java/unusedcode.xml</ruleset>
|
||||||
|
<ruleset>rulesets/java/imports.xml</ruleset>
|
||||||
|
</rulesets>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>verify</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>check</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<!-- Surefire Plugin for tests -->
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>3.3.0</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<reporting>
|
<reporting>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
|
<version>3.6.1</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</reporting>
|
</reporting>
|
||||||
|
|
|
@ -25,7 +25,8 @@ public class GameController {
|
||||||
GameEndCallback callback;
|
GameEndCallback callback;
|
||||||
|
|
||||||
private boolean gameOver = false;
|
private boolean gameOver = false;
|
||||||
private int selectedRow = -1, selectedCol = -1;
|
private int selectedRow = -1;
|
||||||
|
private int selectedCol = -1;
|
||||||
private List<int[]> highlightedFields = new ArrayList<>();
|
private List<int[]> highlightedFields = new ArrayList<>();
|
||||||
private boolean gameWasResignedOrDrawn = false;
|
private boolean gameWasResignedOrDrawn = false;
|
||||||
private GameMode gameMode;
|
private GameMode gameMode;
|
||||||
|
|
Loading…
Reference in New Issue