Merge remote-tracking branch 'origin/Main' into PMD-Korrektur

PMD-Korrektur
Justin Muravjev 2025-06-24 10:53:19 +02:00
commit cf870fec57
2 changed files with 62 additions and 7 deletions

View File

@ -10,13 +10,12 @@
<version>0.0.1-SNAPSHOT</version>
<name>schach</name>
<description>A simple schach.</description>
<description>A simple schach project</description>
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<maven.compiler.release>21</maven.compiler.release>
</properties>
<repositories>
@ -27,22 +26,31 @@
</repositories>
<dependencies>
<!-- Schachlib (bhlangonijr) -->
<!-- Schachlib -->
<dependency>
<groupId>com.github.bhlangonijr</groupId>
<artifactId>chesslib</artifactId>
<version>1.3.4</version>
</dependency>
<!-- JUnit 3 (wie im Template, ggf. auf JUnit 4/5 upgraden für moderne Projekte) -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.10.2</version>
<scope>test</scope>
</dependency>
<!-- Mockito -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.11.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
@ -83,12 +91,58 @@
</plugin>
</plugins>
</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>
<reporting>
<plugins>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.6.1</version>
</plugin>
</plugins>
</reporting>

View File

@ -25,7 +25,8 @@ public class GameController {
GameEndCallback callback;
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 boolean gameWasResignedOrDrawn = false;
private GameMode gameMode;