From b50a9eca4068b4c6b9b305d88ef6a4110975505b Mon Sep 17 00:00:00 2001 From: Janis Date: Sat, 18 Apr 2026 15:26:13 +0200 Subject: [PATCH 01/16] feat: Add Dockerfiles and configuration for Quarkus application --- gradle.properties | 6 ++ modules/core/.dockerignore | 5 + modules/core/.gitignore | 41 +++++++ modules/core/build.gradle.kts | 47 +++++++- modules/core/src/main/docker/Dockerfile.jvm | 100 ++++++++++++++++++ .../src/main/docker/Dockerfile.legacy-jar | 96 +++++++++++++++++ .../core/src/main/docker/Dockerfile.native | 29 +++++ .../src/main/docker/Dockerfile.native-micro | 32 ++++++ .../main/resources/resources/application.yml | 2 + .../src/main/resources/resources/import.sql | 6 ++ settings.gradle.kts | 14 +++ 11 files changed, 376 insertions(+), 2 deletions(-) create mode 100644 gradle.properties create mode 100644 modules/core/.dockerignore create mode 100644 modules/core/.gitignore create mode 100644 modules/core/src/main/docker/Dockerfile.jvm create mode 100644 modules/core/src/main/docker/Dockerfile.legacy-jar create mode 100644 modules/core/src/main/docker/Dockerfile.native create mode 100644 modules/core/src/main/docker/Dockerfile.native-micro create mode 100644 modules/core/src/main/resources/resources/application.yml create mode 100644 modules/core/src/main/resources/resources/import.sql diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..484c2b2 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,6 @@ +# Gradle properties +quarkusPluginId=io.quarkus +quarkusPluginVersion=3.32.4 +quarkusPlatformGroupId=io.quarkus.platform +quarkusPlatformArtifactId=quarkus-bom +quarkusPlatformVersion=3.32.4 diff --git a/modules/core/.dockerignore b/modules/core/.dockerignore new file mode 100644 index 0000000..376e5c6 --- /dev/null +++ b/modules/core/.dockerignore @@ -0,0 +1,5 @@ +.gitignore +!build/*-runner +!build/*-runner.jar +!build/lib/* +!build/quarkus-app/* \ No newline at end of file diff --git a/modules/core/.gitignore b/modules/core/.gitignore new file mode 100644 index 0000000..ba4fbcc --- /dev/null +++ b/modules/core/.gitignore @@ -0,0 +1,41 @@ +# Gradle +.gradle/ +build/ + +# Eclipse +.project +.classpath +.settings/ +bin/ + +# IntelliJ +.idea +*.ipr +*.iml +*.iws + +# NetBeans +nb-configuration.xml + +# Visual Studio Code +.vscode +.factorypath + +# OSX +.DS_Store + +# Vim +*.swp +*.swo + +# patch +*.orig +*.rej + +# Local environment +.env + +# Plugin directory +/.quarkus/cli/plugins/ +# TLS Certificates +.certs/ diff --git a/modules/core/build.gradle.kts b/modules/core/build.gradle.kts index f72b4d1..c61a0e2 100644 --- a/modules/core/build.gradle.kts +++ b/modules/core/build.gradle.kts @@ -1,6 +1,7 @@ plugins { id("scala") id("org.scoverage") version "8.1" + id("io.quarkus") } group = "de.nowchess" @@ -25,6 +26,11 @@ tasks.withType { scalaCompileOptions.additionalParameters = listOf("-encoding", "UTF-8") } +val quarkusPlatformGroupId: String by project +val quarkusPlatformArtifactId: String by project +val quarkusPlatformVersion: String by project + + dependencies { implementation("org.scala-lang:scala3-compiler_3") { @@ -43,19 +49,56 @@ dependencies { implementation(project(":modules:rule")) implementation(project(":modules:bot")) + + implementation(enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")) + implementation("io.quarkus:quarkus-rest") + implementation("io.quarkus:quarkus-hibernate-orm") + implementation("io.quarkus:quarkus-rest-client-jackson") + implementation("io.quarkus:quarkus-rest-client") + implementation("io.quarkus:quarkus-rest-jackson") + implementation("io.quarkus:quarkus-config-yaml") + implementation("io.quarkus:quarkus-smallrye-fault-tolerance") + implementation("io.quarkus:quarkus-smallrye-jwt") + implementation("io.quarkus:quarkus-smallrye-health") + implementation("io.quarkus:quarkus-micrometer") + implementation("io.quarkus:quarkus-arc") + + testImplementation(platform("org.junit:junit-bom:5.13.4")) testImplementation("org.junit.jupiter:junit-jupiter") testImplementation("org.scalatest:scalatest_3:${versions["SCALATEST"]!!}") testImplementation("co.helmethair:scalatest-junit-runner:${versions["SCALATEST_JUNIT"]!!}") + testImplementation("io.quarkus:quarkus-junit5") + testImplementation("io.rest-assured:rest-assured") testRuntimeOnly("org.junit.platform:junit-platform-launcher") } +configurations.matching { !it.name.startsWith("scoverage") }.configureEach { + resolutionStrategy.force("org.scala-lang:scala-library:${versions["SCALA_LIBRARY"]!!}") +} +configurations.scoverage { + resolutionStrategy.eachDependency { + if (requested.group == "org.scoverage" && requested.name.startsWith("scalac-scoverage-plugin_")) { + useTarget("${requested.group}:scalac-scoverage-plugin_2.13.16:2.3.0") + } + } +} + +tasks.withType { + options.encoding = "UTF-8" + options.compilerArgs.add("-parameters") +} + +tasks.withType().configureEach { + duplicatesStrategy = DuplicatesStrategy.EXCLUDE +} + tasks.test { useJUnitPlatform { - includeEngines("scalatest") + includeEngines("scalatest", "junit-jupiter") testLogging { - events("skipped", "failed") + events("passed", "skipped", "failed") } } finalizedBy(tasks.reportScoverage) diff --git a/modules/core/src/main/docker/Dockerfile.jvm b/modules/core/src/main/docker/Dockerfile.jvm new file mode 100644 index 0000000..c3c09fc --- /dev/null +++ b/modules/core/src/main/docker/Dockerfile.jvm @@ -0,0 +1,100 @@ +#### +# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode +# +# Before building the container image run: +# +# ./gradlew build +# +# Then, build the image with: +# +# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/backcore-jvm . +# +# Then run the container using: +# +# docker run -i --rm -p 8080:8080 quarkus/backcore-jvm +# +# If you want to include the debug port into your docker image +# you will have to expose the debug port (default 5005 being the default) like this : EXPOSE 8080 5005. +# Additionally you will have to set -e JAVA_DEBUG=true and -e JAVA_DEBUG_PORT=*:5005 +# when running the container +# +# Then run the container using : +# +# docker run -i --rm -p 8080:8080 quarkus/backcore-jvm +# +# This image uses the `run-java.sh` script to run the application. +# This scripts computes the command line to execute your Java application, and +# includes memory/GC tuning. +# You can configure the behavior using the following environment properties: +# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class") - Be aware that this will override +# the default JVM options, use `JAVA_OPTS_APPEND` to append options +# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options +# in JAVA_OPTS (example: "-Dsome.property=foo") +# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is +# used to calculate a default maximal heap memory based on a containers restriction. +# If used in a container without any memory constraints for the container then this +# option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio +# of the container available memory as set here. The default is `50` which means 50% +# of the available memory is used as an upper boundary. You can skip this mechanism by +# setting this value to `0` in which case no `-Xmx` option is added. +# - JAVA_INITIAL_MEM_RATIO: Is used when no `-Xms` option is given in JAVA_OPTS. This +# is used to calculate a default initial heap memory based on the maximum heap memory. +# If used in a container without any memory constraints for the container then this +# option has no effect. If there is a memory constraint then `-Xms` is set to a ratio +# of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx` +# is used as the initial heap size. You can skip this mechanism by setting this value +# to `0` in which case no `-Xms` option is added (example: "25") +# - JAVA_MAX_INITIAL_MEM: Is used when no `-Xms` option is given in JAVA_OPTS. +# This is used to calculate the maximum value of the initial heap memory. If used in +# a container without any memory constraints for the container then this option has +# no effect. If there is a memory constraint then `-Xms` is limited to the value set +# here. The default is 4096MB which means the calculated value of `-Xms` never will +# be greater than 4096MB. The value of this variable is expressed in MB (example: "4096") +# - JAVA_DIAGNOSTICS: Set this to get some diagnostics information to standard output +# when things are happening. This option, if set to true, will set +# `-XX:+UnlockDiagnosticVMOptions`. Disabled by default (example: "true"). +# - JAVA_DEBUG: If set remote debugging will be switched on. Disabled by default (example: +# true"). +# - JAVA_DEBUG_PORT: Port used for remote debugging. Defaults to 5005 (example: "8787"). +# - CONTAINER_CORE_LIMIT: A calculated core limit as described in +# https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt. (example: "2") +# - CONTAINER_MAX_MEMORY: Memory limit given to the container (example: "1024"). +# - GC_MIN_HEAP_FREE_RATIO: Minimum percentage of heap free after GC to avoid expansion. +# (example: "20") +# - GC_MAX_HEAP_FREE_RATIO: Maximum percentage of heap free after GC to avoid shrinking. +# (example: "40") +# - GC_TIME_RATIO: Specifies the ratio of the time spent outside the garbage collection. +# (example: "4") +# - GC_ADAPTIVE_SIZE_POLICY_WEIGHT: The weighting given to the current GC time versus +# previous GC times. (example: "90") +# - GC_METASPACE_SIZE: The initial metaspace size. (example: "20") +# - GC_MAX_METASPACE_SIZE: The maximum metaspace size. (example: "100") +# - GC_CONTAINER_OPTIONS: Specify Java GC to use. The value of this variable should +# contain the necessary JRE command-line options to specify the required GC, which +# will override the default of `-XX:+UseParallelGC` (example: -XX:+UseG1GC). +# - HTTPS_PROXY: The location of the https proxy. (example: "myuser@127.0.0.1:8080") +# - HTTP_PROXY: The location of the http proxy. (example: "myuser@127.0.0.1:8080") +# - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that can be +# accessed directly. (example: "foo.example.com,bar.example.com") +# +# You can find more information about the UBI base runtime images and their configuration here: +# https://rh-openjdk.github.io/redhat-openjdk-containers/ +### +FROM registry.access.redhat.com/ubi9/openjdk-21-runtime:1.24 + +ENV LANGUAGE='en_US:en' + + +# We make four distinct layers so if there are application changes the library layers can be re-used +COPY --chown=185 build/quarkus-app/lib/ /deployments/lib/ +COPY --chown=185 build/quarkus-app/*.jar /deployments/ +COPY --chown=185 build/quarkus-app/app/ /deployments/app/ +COPY --chown=185 build/quarkus-app/quarkus/ /deployments/quarkus/ + +EXPOSE 8080 +USER 185 +ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" +ENV JAVA_APP_JAR="/deployments/quarkus-run.jar" + +ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ] + diff --git a/modules/core/src/main/docker/Dockerfile.legacy-jar b/modules/core/src/main/docker/Dockerfile.legacy-jar new file mode 100644 index 0000000..8c89666 --- /dev/null +++ b/modules/core/src/main/docker/Dockerfile.legacy-jar @@ -0,0 +1,96 @@ +#### +# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode +# +# Before building the container image run: +# +# ./gradlew build -Dquarkus.package.jar.type=legacy-jar +# +# Then, build the image with: +# +# docker build -f src/main/docker/Dockerfile.legacy-jar -t quarkus/backcore-legacy-jar . +# +# Then run the container using: +# +# docker run -i --rm -p 8080:8080 quarkus/backcore-legacy-jar +# +# If you want to include the debug port into your docker image +# you will have to expose the debug port (default 5005 being the default) like this : EXPOSE 8080 5005. +# Additionally you will have to set -e JAVA_DEBUG=true and -e JAVA_DEBUG_PORT=*:5005 +# when running the container +# +# Then run the container using : +# +# docker run -i --rm -p 8080:8080 quarkus/backcore-legacy-jar +# +# This image uses the `run-java.sh` script to run the application. +# This scripts computes the command line to execute your Java application, and +# includes memory/GC tuning. +# You can configure the behavior using the following environment properties: +# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class") - Be aware that this will override +# the default JVM options, use `JAVA_OPTS_APPEND` to append options +# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options +# in JAVA_OPTS (example: "-Dsome.property=foo") +# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is +# used to calculate a default maximal heap memory based on a containers restriction. +# If used in a container without any memory constraints for the container then this +# option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio +# of the container available memory as set here. The default is `50` which means 50% +# of the available memory is used as an upper boundary. You can skip this mechanism by +# setting this value to `0` in which case no `-Xmx` option is added. +# - JAVA_INITIAL_MEM_RATIO: Is used when no `-Xms` option is given in JAVA_OPTS. This +# is used to calculate a default initial heap memory based on the maximum heap memory. +# If used in a container without any memory constraints for the container then this +# option has no effect. If there is a memory constraint then `-Xms` is set to a ratio +# of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx` +# is used as the initial heap size. You can skip this mechanism by setting this value +# to `0` in which case no `-Xms` option is added (example: "25") +# - JAVA_MAX_INITIAL_MEM: Is used when no `-Xms` option is given in JAVA_OPTS. +# This is used to calculate the maximum value of the initial heap memory. If used in +# a container without any memory constraints for the container then this option has +# no effect. If there is a memory constraint then `-Xms` is limited to the value set +# here. The default is 4096MB which means the calculated value of `-Xms` never will +# be greater than 4096MB. The value of this variable is expressed in MB (example: "4096") +# - JAVA_DIAGNOSTICS: Set this to get some diagnostics information to standard output +# when things are happening. This option, if set to true, will set +# `-XX:+UnlockDiagnosticVMOptions`. Disabled by default (example: "true"). +# - JAVA_DEBUG: If set remote debugging will be switched on. Disabled by default (example: +# true"). +# - JAVA_DEBUG_PORT: Port used for remote debugging. Defaults to 5005 (example: "8787"). +# - CONTAINER_CORE_LIMIT: A calculated core limit as described in +# https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt. (example: "2") +# - CONTAINER_MAX_MEMORY: Memory limit given to the container (example: "1024"). +# - GC_MIN_HEAP_FREE_RATIO: Minimum percentage of heap free after GC to avoid expansion. +# (example: "20") +# - GC_MAX_HEAP_FREE_RATIO: Maximum percentage of heap free after GC to avoid shrinking. +# (example: "40") +# - GC_TIME_RATIO: Specifies the ratio of the time spent outside the garbage collection. +# (example: "4") +# - GC_ADAPTIVE_SIZE_POLICY_WEIGHT: The weighting given to the current GC time versus +# previous GC times. (example: "90") +# - GC_METASPACE_SIZE: The initial metaspace size. (example: "20") +# - GC_MAX_METASPACE_SIZE: The maximum metaspace size. (example: "100") +# - GC_CONTAINER_OPTIONS: Specify Java GC to use. The value of this variable should +# contain the necessary JRE command-line options to specify the required GC, which +# will override the default of `-XX:+UseParallelGC` (example: -XX:+UseG1GC). +# - HTTPS_PROXY: The location of the https proxy. (example: "myuser@127.0.0.1:8080") +# - HTTP_PROXY: The location of the http proxy. (example: "myuser@127.0.0.1:8080") +# - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that can be +# accessed directly. (example: "foo.example.com,bar.example.com") +# +# You can find more information about the UBI base runtime images and their configuration here: +# https://rh-openjdk.github.io/redhat-openjdk-containers/ +### +FROM registry.access.redhat.com/ubi9/openjdk-21-runtime:1.24 + +ENV LANGUAGE='en_US:en' + + +COPY build/lib/* /deployments/lib/ +COPY build/*-runner.jar /deployments/quarkus-run.jar + +EXPOSE 8080 +USER 185 +ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" +ENV JAVA_APP_JAR="/deployments/quarkus-run.jar" + +ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ] diff --git a/modules/core/src/main/docker/Dockerfile.native b/modules/core/src/main/docker/Dockerfile.native new file mode 100644 index 0000000..57defbf --- /dev/null +++ b/modules/core/src/main/docker/Dockerfile.native @@ -0,0 +1,29 @@ +#### +# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode. +# +# Before building the container image run: +# +# ./gradlew build -Dquarkus.native.enabled=true +# +# Then, build the image with: +# +# docker build -f src/main/docker/Dockerfile.native -t quarkus/backcore . +# +# Then run the container using: +# +# docker run -i --rm -p 8080:8080 quarkus/backcore +# +# The ` registry.access.redhat.com/ubi9/ubi-minimal:9.7` base image is based on UBI 9. +# To use UBI 8, switch to `quay.io/ubi8/ubi-minimal:8.10`. +### +FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7 +WORKDIR /work/ +RUN chown 1001 /work \ + && chmod "g+rwX" /work \ + && chown 1001:root /work +COPY --chown=1001:root --chmod=0755 build/*-runner /work/application + +EXPOSE 8080 +USER 1001 + +ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0"] diff --git a/modules/core/src/main/docker/Dockerfile.native-micro b/modules/core/src/main/docker/Dockerfile.native-micro new file mode 100644 index 0000000..9408243 --- /dev/null +++ b/modules/core/src/main/docker/Dockerfile.native-micro @@ -0,0 +1,32 @@ +#### +# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode. +# It uses a micro base image, tuned for Quarkus native executables. +# It reduces the size of the resulting container image. +# Check https://quarkus.io/guides/quarkus-runtime-base-image for further information about this image. +# +# Before building the container image run: +# +# ./gradlew build -Dquarkus.native.enabled=true +# +# Then, build the image with: +# +# docker build -f src/main/docker/Dockerfile.native-micro -t quarkus/backcore . +# +# Then run the container using: +# +# docker run -i --rm -p 8080:8080 quarkus/backcore +# +# The `quay.io/quarkus/ubi9-quarkus-micro-image:2.0` base image is based on UBI 9. +# To use UBI 8, switch to `quay.io/quarkus/quarkus-micro-image:2.0`. +### +FROM quay.io/quarkus/ubi9-quarkus-micro-image:2.0 +WORKDIR /work/ +RUN chown 1001 /work \ + && chmod "g+rwX" /work \ + && chown 1001:root /work +COPY --chown=1001:root --chmod=0755 build/*-runner /work/application + +EXPOSE 8080 +USER 1001 + +ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0"] diff --git a/modules/core/src/main/resources/resources/application.yml b/modules/core/src/main/resources/resources/application.yml new file mode 100644 index 0000000..527a35f --- /dev/null +++ b/modules/core/src/main/resources/resources/application.yml @@ -0,0 +1,2 @@ +greeting: + message: "hello" diff --git a/modules/core/src/main/resources/resources/import.sql b/modules/core/src/main/resources/resources/import.sql new file mode 100644 index 0000000..16aa523 --- /dev/null +++ b/modules/core/src/main/resources/resources/import.sql @@ -0,0 +1,6 @@ +-- This file allow to write SQL commands that will be emitted in test and dev. +-- The commands are commented as their support depends of the database +-- insert into myentity (id, field) values(1, 'field-1'); +-- insert into myentity (id, field) values(2, 'field-2'); +-- insert into myentity (id, field) values(3, 'field-3'); +-- alter sequence myentity_seq restart with 4; \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index c47f490..e5cab2b 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,4 +1,18 @@ rootProject.name = "NowChessSystems" + +pluginManagement { + val quarkusPluginVersion: String by settings + val quarkusPluginId: String by settings + repositories { + mavenCentral() + gradlePluginPortal() + mavenLocal() + } + plugins { + id(quarkusPluginId) version quarkusPluginVersion + } +} + include( "modules:core", "modules:api", -- 2.52.0 From 3849885c664ba94ccd2feff03a149268fcd88d09 Mon Sep 17 00:00:00 2001 From: Janis Date: Sun, 19 Apr 2026 21:04:40 +0200 Subject: [PATCH 02/16] feat: NCS-37 Add initial API structure and DTOs for NowChess application --- .codesight/CODESIGHT.md | 116 +++--- .codesight/graph.md | 48 +-- .codesight/libs.md | 68 +-- .codesight/report.html | 198 +++++++++ .idea/gradle.xml | 1 - .../NowChessSystems_modules_core_main.xml | 33 ++ .idea/scala_compiler.xml | 2 +- bruno/bruno.json | 6 + bruno/collection.bru | 0 bruno/draw/01 Offer Draw.bru | 12 + bruno/draw/02 Accept Draw.bru | 12 + bruno/draw/03 Decline Draw.bru | 12 + bruno/draw/04 Claim Draw.bru | 12 + bruno/draw/folder.bru | 4 + bruno/environments/local.bru | 3 + bruno/export/01 Export FEN.bru | 12 + bruno/export/02 Export PGN.bru | 12 + bruno/export/folder.bru | 4 + bruno/game/01 Create Game.bru | 23 + bruno/game/02 Get Game.bru | 12 + bruno/game/03 Stream Game.bru | 19 + bruno/game/04 Resign.bru | 12 + bruno/game/folder.bru | 4 + bruno/import/01 Import FEN.bru | 24 ++ bruno/import/02 Import PGN.bru | 22 + bruno/import/folder.bru | 4 + bruno/move/01 Make Move.bru | 15 + bruno/move/02 Get Legal Moves.bru | 19 + bruno/move/03 Undo Move.bru | 12 + bruno/move/04 Redo Move.bru | 12 + bruno/move/folder.bru | 3 + docs/{api-spec.yaml => board-api-spec.yaml} | 11 +- .../de/nowchess/api/dto/ApiErrorDto.scala | 3 + .../api/dto/CreateGameRequestDto.scala | 6 + .../de/nowchess/api/dto/ErrorEventDto.scala | 6 + .../de/nowchess/api/dto/GameFullDto.scala | 8 + .../nowchess/api/dto/GameFullEventDto.scala | 6 + .../de/nowchess/api/dto/GameStateDto.scala | 12 + .../nowchess/api/dto/GameStateEventDto.scala | 6 + .../api/dto/ImportFenRequestDto.scala | 7 + .../api/dto/ImportPgnRequestDto.scala | 3 + .../de/nowchess/api/dto/LegalMoveDto.scala | 9 + .../api/dto/LegalMovesResponseDto.scala | 3 + .../de/nowchess/api/dto/OkResponseDto.scala | 3 + .../de/nowchess/api/dto/PlayerInfoDto.scala | 3 + modules/core/build.gradle.kts | 2 + .../nowchess/chess/config/JacksonConfig.scala | 11 + .../de/nowchess/chess/engine/GameEngine.scala | 16 + .../chess/exception/ApiException.scala | 13 + .../chess/exception/ApiExceptionMapper.scala | 14 + .../nowchess/chess/registry/GameEntry.scala | 14 + .../chess/registry/GameRegistry.scala | 7 + .../chess/registry/GameRegistryImpl.scala | 22 + .../chess/resource/GameResource.scala | 306 ++++++++++++++ modules/ui/CHANGELOG.md | 119 ------ modules/ui/build.gradle.kts | 101 ----- .../resources/sprites/board/board_bottom.png | Bin 161 -> 0 bytes .../sprites/board/board_square_black.png | Bin 188 -> 0 bytes .../sprites/board/board_square_white.png | Bin 188 -> 0 bytes .../resources/sprites/pieces/black_bishop.png | Bin 286 -> 0 bytes .../resources/sprites/pieces/black_king.png | Bin 245 -> 0 bytes .../resources/sprites/pieces/black_knight.png | Bin 266 -> 0 bytes .../resources/sprites/pieces/black_pawn.png | Bin 297 -> 0 bytes .../resources/sprites/pieces/black_queen.png | Bin 258 -> 0 bytes .../resources/sprites/pieces/black_rook.png | Bin 263 -> 0 bytes .../resources/sprites/pieces/white_bishop.png | Bin 313 -> 0 bytes .../resources/sprites/pieces/white_king.png | Bin 251 -> 0 bytes .../resources/sprites/pieces/white_knight.png | Bin 275 -> 0 bytes .../resources/sprites/pieces/white_pawn.png | Bin 305 -> 0 bytes .../resources/sprites/pieces/white_queen.png | Bin 281 -> 0 bytes .../resources/sprites/pieces/white_rook.png | Bin 280 -> 0 bytes modules/ui/src/main/resources/styles.css | 30 -- .../src/main/scala/de/nowchess/ui/Main.scala | 34 -- .../de/nowchess/ui/gui/ChessBoardView.scala | 392 ------------------ .../scala/de/nowchess/ui/gui/ChessGUI.scala | 57 --- .../de/nowchess/ui/gui/GUIObserver.scala | 80 ---- .../de/nowchess/ui/gui/PieceSprites.scala | 34 -- .../de/nowchess/ui/terminal/TerminalUI.scala | 107 ----- .../de/nowchess/ui/utils/PieceUnicode.scala | 18 - .../scala/de/nowchess/ui/utils/Renderer.scala | 30 -- .../ui/utils/RendererAndUnicodeTest.scala | 44 -- modules/ui/versions.env | 3 - settings.gradle.kts | 1 - 83 files changed, 1107 insertions(+), 1170 deletions(-) create mode 100644 .codesight/report.html create mode 100644 .idea/runConfigurations/NowChessSystems_modules_core_main.xml create mode 100644 bruno/bruno.json create mode 100644 bruno/collection.bru create mode 100644 bruno/draw/01 Offer Draw.bru create mode 100644 bruno/draw/02 Accept Draw.bru create mode 100644 bruno/draw/03 Decline Draw.bru create mode 100644 bruno/draw/04 Claim Draw.bru create mode 100644 bruno/draw/folder.bru create mode 100644 bruno/environments/local.bru create mode 100644 bruno/export/01 Export FEN.bru create mode 100644 bruno/export/02 Export PGN.bru create mode 100644 bruno/export/folder.bru create mode 100644 bruno/game/01 Create Game.bru create mode 100644 bruno/game/02 Get Game.bru create mode 100644 bruno/game/03 Stream Game.bru create mode 100644 bruno/game/04 Resign.bru create mode 100644 bruno/game/folder.bru create mode 100644 bruno/import/01 Import FEN.bru create mode 100644 bruno/import/02 Import PGN.bru create mode 100644 bruno/import/folder.bru create mode 100644 bruno/move/01 Make Move.bru create mode 100644 bruno/move/02 Get Legal Moves.bru create mode 100644 bruno/move/03 Undo Move.bru create mode 100644 bruno/move/04 Redo Move.bru create mode 100644 bruno/move/folder.bru rename docs/{api-spec.yaml => board-api-spec.yaml} (98%) create mode 100644 modules/api/src/main/scala/de/nowchess/api/dto/ApiErrorDto.scala create mode 100644 modules/api/src/main/scala/de/nowchess/api/dto/CreateGameRequestDto.scala create mode 100644 modules/api/src/main/scala/de/nowchess/api/dto/ErrorEventDto.scala create mode 100644 modules/api/src/main/scala/de/nowchess/api/dto/GameFullDto.scala create mode 100644 modules/api/src/main/scala/de/nowchess/api/dto/GameFullEventDto.scala create mode 100644 modules/api/src/main/scala/de/nowchess/api/dto/GameStateDto.scala create mode 100644 modules/api/src/main/scala/de/nowchess/api/dto/GameStateEventDto.scala create mode 100644 modules/api/src/main/scala/de/nowchess/api/dto/ImportFenRequestDto.scala create mode 100644 modules/api/src/main/scala/de/nowchess/api/dto/ImportPgnRequestDto.scala create mode 100644 modules/api/src/main/scala/de/nowchess/api/dto/LegalMoveDto.scala create mode 100644 modules/api/src/main/scala/de/nowchess/api/dto/LegalMovesResponseDto.scala create mode 100644 modules/api/src/main/scala/de/nowchess/api/dto/OkResponseDto.scala create mode 100644 modules/api/src/main/scala/de/nowchess/api/dto/PlayerInfoDto.scala create mode 100644 modules/core/src/main/scala/de/nowchess/chess/config/JacksonConfig.scala create mode 100644 modules/core/src/main/scala/de/nowchess/chess/exception/ApiException.scala create mode 100644 modules/core/src/main/scala/de/nowchess/chess/exception/ApiExceptionMapper.scala create mode 100644 modules/core/src/main/scala/de/nowchess/chess/registry/GameEntry.scala create mode 100644 modules/core/src/main/scala/de/nowchess/chess/registry/GameRegistry.scala create mode 100644 modules/core/src/main/scala/de/nowchess/chess/registry/GameRegistryImpl.scala create mode 100644 modules/core/src/main/scala/de/nowchess/chess/resource/GameResource.scala delete mode 100644 modules/ui/CHANGELOG.md delete mode 100644 modules/ui/build.gradle.kts delete mode 100644 modules/ui/src/main/resources/sprites/board/board_bottom.png delete mode 100644 modules/ui/src/main/resources/sprites/board/board_square_black.png delete mode 100644 modules/ui/src/main/resources/sprites/board/board_square_white.png delete mode 100644 modules/ui/src/main/resources/sprites/pieces/black_bishop.png delete mode 100644 modules/ui/src/main/resources/sprites/pieces/black_king.png delete mode 100644 modules/ui/src/main/resources/sprites/pieces/black_knight.png delete mode 100644 modules/ui/src/main/resources/sprites/pieces/black_pawn.png delete mode 100644 modules/ui/src/main/resources/sprites/pieces/black_queen.png delete mode 100644 modules/ui/src/main/resources/sprites/pieces/black_rook.png delete mode 100644 modules/ui/src/main/resources/sprites/pieces/white_bishop.png delete mode 100644 modules/ui/src/main/resources/sprites/pieces/white_king.png delete mode 100644 modules/ui/src/main/resources/sprites/pieces/white_knight.png delete mode 100644 modules/ui/src/main/resources/sprites/pieces/white_pawn.png delete mode 100644 modules/ui/src/main/resources/sprites/pieces/white_queen.png delete mode 100644 modules/ui/src/main/resources/sprites/pieces/white_rook.png delete mode 100644 modules/ui/src/main/resources/styles.css delete mode 100644 modules/ui/src/main/scala/de/nowchess/ui/Main.scala delete mode 100644 modules/ui/src/main/scala/de/nowchess/ui/gui/ChessBoardView.scala delete mode 100644 modules/ui/src/main/scala/de/nowchess/ui/gui/ChessGUI.scala delete mode 100644 modules/ui/src/main/scala/de/nowchess/ui/gui/GUIObserver.scala delete mode 100644 modules/ui/src/main/scala/de/nowchess/ui/gui/PieceSprites.scala delete mode 100644 modules/ui/src/main/scala/de/nowchess/ui/terminal/TerminalUI.scala delete mode 100644 modules/ui/src/main/scala/de/nowchess/ui/utils/PieceUnicode.scala delete mode 100644 modules/ui/src/main/scala/de/nowchess/ui/utils/Renderer.scala delete mode 100644 modules/ui/src/test/scala/de/nowchess/ui/utils/RendererAndUnicodeTest.scala delete mode 100644 modules/ui/versions.env diff --git a/.codesight/CODESIGHT.md b/.codesight/CODESIGHT.md index 146014f..e84c141 100644 --- a/.codesight/CODESIGHT.md +++ b/.codesight/CODESIGHT.md @@ -47,14 +47,21 @@ - class Square - function fromAlgebraic - function offset +- `modules/api/src/main/scala/de/nowchess/api/bot/Bot.scala` + - class Bot + - function name + - function nextMove +- `modules/api/src/main/scala/de/nowchess/api/dto/ErrorEventDto.scala` — class ErrorEventDto, function apply +- `modules/api/src/main/scala/de/nowchess/api/dto/GameFullEventDto.scala` — class GameFullEventDto, function apply +- `modules/api/src/main/scala/de/nowchess/api/dto/GameStateEventDto.scala` — class GameStateEventDto, function apply - `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala` + - function kingSquare - function withBoard - function withTurn - function withCastlingRights - function withEnPassantSquare - function withHalfMoveClock - - function withMove - - _...2 more_ + - _...4 more_ - `modules/api/src/main/scala/de/nowchess/api/player/PlayerInfo.scala` — class PlayerId, function apply - `modules/api/src/main/scala/de/nowchess/api/response/ApiResponse.scala` - class ApiResponse @@ -79,6 +86,7 @@ - `modules/bot/python/src/export.py` — function export_to_nbai: (weights_file, output_file, trained_by, train_loss) - `modules/bot/python/src/generate.py` — function play_random_game_and_collect_positions: (output_file, total_positions, samples_per_game, min_move, max_move, num_workers) - `modules/bot/python/src/label.py` — function normalize_evaluation: (cp_value, method, scale), function label_positions_with_stockfish: (positions_file, output_file, stockfish_path, batch_size, depth, verbose, normalize, num_workers) +- `modules/bot/python/src/lichess_importer.py` — function import_lichess_evals: (input_path, output_file, max_positions, min_depth, verbose) -> int - `modules/bot/python/src/tactical_positions_extractor.py` - function download_and_extract_puzzle_db: (url, output_dir) - function extract_puzzle_positions: (puzzle_csv, max_puzzles) -> Set[str] @@ -90,14 +98,10 @@ - function fen_to_features: (fen) - function find_next_version: (base_name) - function save_metadata: (weights_file, metadata) - - function train_nnue: (data_file, output_file, epochs, batch_size, lr, checkpoint, stockfish_depth, use_versioning, early_stopping_patience, weight_decay, subsample_ratio) - - function burst_train: (data_file, output_file, duration_minutes, epochs_per_season, early_stopping_patience, batch_size, lr, initial_checkpoint, stockfish_depth, use_versioning, weight_decay, subsample_ratio) + - function train_nnue: (data_file, output_file, epochs, batch_size, lr, checkpoint, stockfish_depth, use_versioning, early_stopping_patience, weight_decay, subsample_ratio, hidden_sizes) + - function burst_train: (data_file, output_file, duration_minutes, epochs_per_season, early_stopping_patience, batch_size, lr, initial_checkpoint, stockfish_depth, use_versioning, weight_decay, subsample_ratio, hidden_sizes) - class NNUEDataset - _...1 more_ -- `modules/bot/src/main/scala/de/nowchess/bot/Bot.scala` - - class Bot - - function name - - function nextMove - `modules/bot/src/main/scala/de/nowchess/bot/BotController.scala` - class BotController - function getBot @@ -148,7 +152,6 @@ - function bestMoveWithTime - function loop - function loop - - _...2 more_ - `modules/bot/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala` - class MoveOrdering - class OrderingContext @@ -158,6 +161,7 @@ - function getHistory - _...3 more_ - `modules/bot/src/main/scala/de/nowchess/bot/logic/TranspositionTable.scala` + - function advance - function probe - function store - function clear @@ -181,14 +185,15 @@ - function history - function getCurrentIndex - _...3 more_ +- `modules/core/src/main/scala/de/nowchess/chess/config/JacksonConfig.scala` — class JacksonConfig, function customize - `modules/core/src/main/scala/de/nowchess/chess/controller/Parser.scala` — class Parser, function parseMove - `modules/core/src/main/scala/de/nowchess/chess/engine/GameEngine.scala` - class GameEngine - - function isPendingPromotion - function board - function turn - function context - function canUndo + - function canRedo - _...11 more_ - `modules/core/src/main/scala/de/nowchess/chess/observer/Observer.scala` - function context @@ -198,6 +203,26 @@ - function subscribe - function unsubscribe - _...1 more_ +- `modules/core/src/main/scala/de/nowchess/chess/registry/GameRegistry.scala` + - class GameRegistry + - function store + - function get + - function update + - function generateId +- `modules/core/src/main/scala/de/nowchess/chess/registry/GameRegistryImpl.scala` + - class GameRegistryImpl + - function store + - function get + - function update + - function generateId +- `modules/core/src/main/scala/de/nowchess/chess/resource/GameResource.scala` + - function onGameEvent + - function createGame + - function getGame + - function streamGame + - function onGameEvent + - function resignGame + - _...9 more_ - `modules/io/src/main/scala/de/nowchess/io/GameContextExport.scala` — class GameContextExport, function exportGameContext - `modules/io/src/main/scala/de/nowchess/io/GameContextImport.scala` — class GameContextImport, function importGameContext - `modules/io/src/main/scala/de/nowchess/io/GameFileService.scala` @@ -247,32 +272,13 @@ - function allLegalMoves - function isCheck - function isCheckmate - - _...4 more_ + - _...5 more_ - `modules/rule/src/main/scala/de/nowchess/rules/sets/DefaultRules.scala` - class DefaultRules + - function positionOf - function loop - function toMoves - function loop -- `modules/ui/src/main/scala/de/nowchess/ui/Main.scala` — class Main, function main -- `modules/ui/src/main/scala/de/nowchess/ui/gui/ChessBoardView.scala` - - class ChessBoardView - - function updateBoard - - function updateUndoRedoButtons - - function showMessage - - function showPromotionDialog -- `modules/ui/src/main/scala/de/nowchess/ui/gui/ChessGUI.scala` - - class ChessGUIApp - - class ChessGUILauncher - - function getEngine - - function launch -- `modules/ui/src/main/scala/de/nowchess/ui/gui/GUIObserver.scala` — class GUIObserver -- `modules/ui/src/main/scala/de/nowchess/ui/gui/PieceSprites.scala` - - class PieceSprites - - function loadPieceImage - - class SquareColors -- `modules/ui/src/main/scala/de/nowchess/ui/terminal/TerminalUI.scala` — class TerminalUI, function start -- `modules/ui/src/main/scala/de/nowchess/ui/utils/PieceUnicode.scala` — function unicode -- `modules/ui/src/main/scala/de/nowchess/ui/utils/Renderer.scala` — class Renderer, function render --- @@ -295,39 +301,39 @@ ## Most Imported Files (change these carefully) -- `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala` — imported by **60** files -- `modules/api/src/main/scala/de/nowchess/api/move/Move.scala` — imported by **40** files -- `modules/api/src/main/scala/de/nowchess/api/board/Square.scala` — imported by **39** files -- `modules/api/src/main/scala/de/nowchess/api/board/Color.scala` — imported by **36** files -- `modules/api/src/main/scala/de/nowchess/api/board/Board.scala` — imported by **22** files -- `modules/api/src/main/scala/de/nowchess/api/board/PieceType.scala` — imported by **21** files -- `modules/api/src/main/scala/de/nowchess/api/board/Piece.scala` — imported by **21** files +- `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala` — imported by **64** files +- `modules/api/src/main/scala/de/nowchess/api/move/Move.scala` — imported by **44** files +- `modules/api/src/main/scala/de/nowchess/api/board/Square.scala` — imported by **40** files +- `modules/api/src/main/scala/de/nowchess/api/board/Color.scala` — imported by **35** files +- `modules/api/src/main/scala/de/nowchess/api/board/Board.scala` — imported by **19** files +- `modules/api/src/main/scala/de/nowchess/api/board/Piece.scala` — imported by **18** files +- `modules/api/src/main/scala/de/nowchess/api/board/PieceType.scala` — imported by **17** files - `modules/rule/src/main/scala/de/nowchess/rules/sets/DefaultRules.scala` — imported by **17** files -- `modules/rule/src/main/scala/de/nowchess/rules/RuleSet.scala` — imported by **10** files +- `modules/rule/src/main/scala/de/nowchess/rules/RuleSet.scala` — imported by **11** files - `modules/io/src/main/scala/de/nowchess/io/fen/FenParser.scala` — imported by **10** files -- `modules/api/src/main/scala/de/nowchess/api/board/CastlingRights.scala` — imported by **8** files -- `modules/io/src/main/scala/de/nowchess/io/GameContextImport.scala` — imported by **8** files +- `modules/api/src/main/scala/de/nowchess/api/board/CastlingRights.scala` — imported by **9** files +- `modules/api/src/main/scala/de/nowchess/api/game/DrawReason.scala` — imported by **7** files +- `modules/io/src/main/scala/de/nowchess/io/GameContextImport.scala` — imported by **7** files +- `modules/api/src/main/scala/de/nowchess/api/bot/Bot.scala` — imported by **6** files +- `modules/bot/src/main/scala/de/nowchess/bot/ai/Evaluation.scala` — imported by **6** files +- `modules/api/src/main/scala/de/nowchess/api/player/PlayerInfo.scala` — imported by **5** files - `modules/bot/src/main/scala/de/nowchess/bot/util/PolyglotBook.scala` — imported by **5** files -- `modules/bot/src/main/scala/de/nowchess/bot/BotDifficulty.scala` — imported by **5** files -- `modules/io/src/main/scala/de/nowchess/io/GameContextExport.scala` — imported by **5** files +- `modules/api/src/main/scala/de/nowchess/api/game/GameResult.scala` — imported by **4** files - `modules/bot/src/main/scala/de/nowchess/bot/bots/ClassicalBot.scala` — imported by **4** files - `modules/bot/src/main/scala/de/nowchess/bot/bots/classic/EvaluationClassic.scala` — imported by **4** files -- `modules/bot/src/main/scala/de/nowchess/bot/logic/AlphaBetaSearch.scala` — imported by **4** files -- `modules/bot/src/main/scala/de/nowchess/bot/Bot.scala` — imported by **4** files -- `modules/core/src/main/scala/de/nowchess/chess/observer/Observer.scala` — imported by **4** files ## Import Map (who imports what) -- `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala` ← `modules/bot/src/main/scala/de/nowchess/bot/Bot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/BotMoveRepetition.scala`, `modules/bot/src/main/scala/de/nowchess/bot/ai/Evaluation.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/ClassicalBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/HybridBot.scala` +55 more -- `modules/api/src/main/scala/de/nowchess/api/move/Move.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/test/scala/de/nowchess/api/board/BoardTest.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/bot/src/main/scala/de/nowchess/bot/Bot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/BotMoveRepetition.scala` +35 more -- `modules/api/src/main/scala/de/nowchess/api/board/Square.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/main/scala/de/nowchess/api/move/Move.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/api/src/test/scala/de/nowchess/api/move/MoveTest.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/classic/EvaluationClassic.scala` +34 more -- `modules/api/src/main/scala/de/nowchess/api/board/Color.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/classic/EvaluationClassic.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala` +31 more -- `modules/api/src/main/scala/de/nowchess/api/board/Board.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala`, `modules/bot/src/test/scala/de/nowchess/bot/AlphaBetaSearchTest.scala` +17 more -- `modules/api/src/main/scala/de/nowchess/api/board/PieceType.scala` ← `modules/bot/src/main/scala/de/nowchess/bot/bots/classic/EvaluationClassic.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/AlphaBetaSearch.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala`, `modules/bot/src/main/scala/de/nowchess/bot/util/PolyglotHash.scala` +16 more -- `modules/api/src/main/scala/de/nowchess/api/board/Piece.scala` ← `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala`, `modules/bot/src/main/scala/de/nowchess/bot/util/PolyglotHash.scala`, `modules/bot/src/main/scala/de/nowchess/bot/util/ZobristHash.scala`, `modules/bot/src/test/scala/de/nowchess/bot/AlphaBetaSearchTest.scala` +16 more +- `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala` ← `modules/api/src/main/scala/de/nowchess/api/bot/Bot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/BotMoveRepetition.scala`, `modules/bot/src/main/scala/de/nowchess/bot/ai/Evaluation.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/ClassicalBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/HybridBot.scala` +59 more +- `modules/api/src/main/scala/de/nowchess/api/move/Move.scala` ← `modules/api/src/main/scala/de/nowchess/api/bot/Bot.scala`, `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/test/scala/de/nowchess/api/board/BoardTest.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/bot/src/main/scala/de/nowchess/bot/BotMoveRepetition.scala` +39 more +- `modules/api/src/main/scala/de/nowchess/api/board/Square.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/main/scala/de/nowchess/api/move/Move.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/api/src/test/scala/de/nowchess/api/move/MoveTest.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/classic/EvaluationClassic.scala` +35 more +- `modules/api/src/main/scala/de/nowchess/api/board/Color.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/main/scala/de/nowchess/api/game/GameResult.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/classic/EvaluationClassic.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala` +30 more +- `modules/api/src/main/scala/de/nowchess/api/board/Board.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala`, `modules/bot/src/test/scala/de/nowchess/bot/AlphaBetaSearchTest.scala` +14 more +- `modules/api/src/main/scala/de/nowchess/api/board/Piece.scala` ← `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala`, `modules/bot/src/main/scala/de/nowchess/bot/util/PolyglotHash.scala`, `modules/bot/src/main/scala/de/nowchess/bot/util/ZobristHash.scala`, `modules/bot/src/test/scala/de/nowchess/bot/AlphaBetaSearchTest.scala` +13 more +- `modules/api/src/main/scala/de/nowchess/api/board/PieceType.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/classic/EvaluationClassic.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/AlphaBetaSearch.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala` +12 more - `modules/rule/src/main/scala/de/nowchess/rules/sets/DefaultRules.scala` ← `modules/bot/src/main/scala/de/nowchess/bot/bots/ClassicalBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/HybridBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/NNUEBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/AlphaBetaSearch.scala`, `modules/bot/src/test/scala/de/nowchess/bot/AlphaBetaSearchTest.scala` +12 more -- `modules/rule/src/main/scala/de/nowchess/rules/RuleSet.scala` ← `modules/bot/src/main/scala/de/nowchess/bot/bots/ClassicalBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/HybridBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/NNUEBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/AlphaBetaSearch.scala`, `modules/bot/src/test/scala/de/nowchess/bot/AlphaBetaSearchTest.scala` +5 more -- `modules/io/src/main/scala/de/nowchess/io/fen/FenParser.scala` ← `modules/bot/src/test/scala/de/nowchess/bot/PolyglotHashTest.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/EngineTestHelpers.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEngineLoadGameTest.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEngineNotationTest.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEnginePromotionTest.scala` +5 more +- `modules/rule/src/main/scala/de/nowchess/rules/RuleSet.scala` ← `modules/bot/src/main/scala/de/nowchess/bot/bots/ClassicalBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/HybridBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/NNUEBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/AlphaBetaSearch.scala`, `modules/bot/src/test/scala/de/nowchess/bot/AlphaBetaSearchTest.scala` +6 more +- `modules/io/src/main/scala/de/nowchess/io/fen/FenParser.scala` ← `modules/bot/src/test/scala/de/nowchess/bot/PolyglotHashTest.scala`, `modules/core/src/main/scala/de/nowchess/chess/resource/GameResource.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/EngineTestHelpers.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEngineLoadGameTest.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEngineNotationTest.scala` +5 more --- diff --git a/.codesight/graph.md b/.codesight/graph.md index f215dea..57ba7eb 100644 --- a/.codesight/graph.md +++ b/.codesight/graph.md @@ -2,36 +2,36 @@ ## Most Imported Files (change these carefully) -- `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala` — imported by **60** files -- `modules/api/src/main/scala/de/nowchess/api/move/Move.scala` — imported by **40** files -- `modules/api/src/main/scala/de/nowchess/api/board/Square.scala` — imported by **39** files -- `modules/api/src/main/scala/de/nowchess/api/board/Color.scala` — imported by **36** files -- `modules/api/src/main/scala/de/nowchess/api/board/Board.scala` — imported by **22** files -- `modules/api/src/main/scala/de/nowchess/api/board/PieceType.scala` — imported by **21** files -- `modules/api/src/main/scala/de/nowchess/api/board/Piece.scala` — imported by **21** files +- `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala` — imported by **64** files +- `modules/api/src/main/scala/de/nowchess/api/move/Move.scala` — imported by **44** files +- `modules/api/src/main/scala/de/nowchess/api/board/Square.scala` — imported by **40** files +- `modules/api/src/main/scala/de/nowchess/api/board/Color.scala` — imported by **35** files +- `modules/api/src/main/scala/de/nowchess/api/board/Board.scala` — imported by **19** files +- `modules/api/src/main/scala/de/nowchess/api/board/Piece.scala` — imported by **18** files +- `modules/api/src/main/scala/de/nowchess/api/board/PieceType.scala` — imported by **17** files - `modules/rule/src/main/scala/de/nowchess/rules/sets/DefaultRules.scala` — imported by **17** files -- `modules/rule/src/main/scala/de/nowchess/rules/RuleSet.scala` — imported by **10** files +- `modules/rule/src/main/scala/de/nowchess/rules/RuleSet.scala` — imported by **11** files - `modules/io/src/main/scala/de/nowchess/io/fen/FenParser.scala` — imported by **10** files -- `modules/api/src/main/scala/de/nowchess/api/board/CastlingRights.scala` — imported by **8** files -- `modules/io/src/main/scala/de/nowchess/io/GameContextImport.scala` — imported by **8** files +- `modules/api/src/main/scala/de/nowchess/api/board/CastlingRights.scala` — imported by **9** files +- `modules/api/src/main/scala/de/nowchess/api/game/DrawReason.scala` — imported by **7** files +- `modules/io/src/main/scala/de/nowchess/io/GameContextImport.scala` — imported by **7** files +- `modules/api/src/main/scala/de/nowchess/api/bot/Bot.scala` — imported by **6** files +- `modules/bot/src/main/scala/de/nowchess/bot/ai/Evaluation.scala` — imported by **6** files +- `modules/api/src/main/scala/de/nowchess/api/player/PlayerInfo.scala` — imported by **5** files - `modules/bot/src/main/scala/de/nowchess/bot/util/PolyglotBook.scala` — imported by **5** files -- `modules/bot/src/main/scala/de/nowchess/bot/BotDifficulty.scala` — imported by **5** files -- `modules/io/src/main/scala/de/nowchess/io/GameContextExport.scala` — imported by **5** files +- `modules/api/src/main/scala/de/nowchess/api/game/GameResult.scala` — imported by **4** files - `modules/bot/src/main/scala/de/nowchess/bot/bots/ClassicalBot.scala` — imported by **4** files - `modules/bot/src/main/scala/de/nowchess/bot/bots/classic/EvaluationClassic.scala` — imported by **4** files -- `modules/bot/src/main/scala/de/nowchess/bot/logic/AlphaBetaSearch.scala` — imported by **4** files -- `modules/bot/src/main/scala/de/nowchess/bot/Bot.scala` — imported by **4** files -- `modules/core/src/main/scala/de/nowchess/chess/observer/Observer.scala` — imported by **4** files ## Import Map (who imports what) -- `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala` ← `modules/bot/src/main/scala/de/nowchess/bot/Bot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/BotMoveRepetition.scala`, `modules/bot/src/main/scala/de/nowchess/bot/ai/Evaluation.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/ClassicalBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/HybridBot.scala` +55 more -- `modules/api/src/main/scala/de/nowchess/api/move/Move.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/test/scala/de/nowchess/api/board/BoardTest.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/bot/src/main/scala/de/nowchess/bot/Bot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/BotMoveRepetition.scala` +35 more -- `modules/api/src/main/scala/de/nowchess/api/board/Square.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/main/scala/de/nowchess/api/move/Move.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/api/src/test/scala/de/nowchess/api/move/MoveTest.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/classic/EvaluationClassic.scala` +34 more -- `modules/api/src/main/scala/de/nowchess/api/board/Color.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/classic/EvaluationClassic.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala` +31 more -- `modules/api/src/main/scala/de/nowchess/api/board/Board.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala`, `modules/bot/src/test/scala/de/nowchess/bot/AlphaBetaSearchTest.scala` +17 more -- `modules/api/src/main/scala/de/nowchess/api/board/PieceType.scala` ← `modules/bot/src/main/scala/de/nowchess/bot/bots/classic/EvaluationClassic.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/AlphaBetaSearch.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala`, `modules/bot/src/main/scala/de/nowchess/bot/util/PolyglotHash.scala` +16 more -- `modules/api/src/main/scala/de/nowchess/api/board/Piece.scala` ← `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala`, `modules/bot/src/main/scala/de/nowchess/bot/util/PolyglotHash.scala`, `modules/bot/src/main/scala/de/nowchess/bot/util/ZobristHash.scala`, `modules/bot/src/test/scala/de/nowchess/bot/AlphaBetaSearchTest.scala` +16 more +- `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala` ← `modules/api/src/main/scala/de/nowchess/api/bot/Bot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/BotMoveRepetition.scala`, `modules/bot/src/main/scala/de/nowchess/bot/ai/Evaluation.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/ClassicalBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/HybridBot.scala` +59 more +- `modules/api/src/main/scala/de/nowchess/api/move/Move.scala` ← `modules/api/src/main/scala/de/nowchess/api/bot/Bot.scala`, `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/test/scala/de/nowchess/api/board/BoardTest.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/bot/src/main/scala/de/nowchess/bot/BotMoveRepetition.scala` +39 more +- `modules/api/src/main/scala/de/nowchess/api/board/Square.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/main/scala/de/nowchess/api/move/Move.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/api/src/test/scala/de/nowchess/api/move/MoveTest.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/classic/EvaluationClassic.scala` +35 more +- `modules/api/src/main/scala/de/nowchess/api/board/Color.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/main/scala/de/nowchess/api/game/GameResult.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/classic/EvaluationClassic.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala` +30 more +- `modules/api/src/main/scala/de/nowchess/api/board/Board.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/api/src/test/scala/de/nowchess/api/game/GameContextTest.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala`, `modules/bot/src/test/scala/de/nowchess/bot/AlphaBetaSearchTest.scala` +14 more +- `modules/api/src/main/scala/de/nowchess/api/board/Piece.scala` ← `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala`, `modules/bot/src/main/scala/de/nowchess/bot/util/PolyglotHash.scala`, `modules/bot/src/main/scala/de/nowchess/bot/util/ZobristHash.scala`, `modules/bot/src/test/scala/de/nowchess/bot/AlphaBetaSearchTest.scala` +13 more +- `modules/api/src/main/scala/de/nowchess/api/board/PieceType.scala` ← `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/classic/EvaluationClassic.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/nnue/NNUE.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/AlphaBetaSearch.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala` +12 more - `modules/rule/src/main/scala/de/nowchess/rules/sets/DefaultRules.scala` ← `modules/bot/src/main/scala/de/nowchess/bot/bots/ClassicalBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/HybridBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/NNUEBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/AlphaBetaSearch.scala`, `modules/bot/src/test/scala/de/nowchess/bot/AlphaBetaSearchTest.scala` +12 more -- `modules/rule/src/main/scala/de/nowchess/rules/RuleSet.scala` ← `modules/bot/src/main/scala/de/nowchess/bot/bots/ClassicalBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/HybridBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/NNUEBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/AlphaBetaSearch.scala`, `modules/bot/src/test/scala/de/nowchess/bot/AlphaBetaSearchTest.scala` +5 more -- `modules/io/src/main/scala/de/nowchess/io/fen/FenParser.scala` ← `modules/bot/src/test/scala/de/nowchess/bot/PolyglotHashTest.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/EngineTestHelpers.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEngineLoadGameTest.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEngineNotationTest.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEnginePromotionTest.scala` +5 more +- `modules/rule/src/main/scala/de/nowchess/rules/RuleSet.scala` ← `modules/bot/src/main/scala/de/nowchess/bot/bots/ClassicalBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/HybridBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/bots/NNUEBot.scala`, `modules/bot/src/main/scala/de/nowchess/bot/logic/AlphaBetaSearch.scala`, `modules/bot/src/test/scala/de/nowchess/bot/AlphaBetaSearchTest.scala` +6 more +- `modules/io/src/main/scala/de/nowchess/io/fen/FenParser.scala` ← `modules/bot/src/test/scala/de/nowchess/bot/PolyglotHashTest.scala`, `modules/core/src/main/scala/de/nowchess/chess/resource/GameResource.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/EngineTestHelpers.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEngineLoadGameTest.scala`, `modules/core/src/test/scala/de/nowchess/chess/engine/GameEngineNotationTest.scala` +5 more diff --git a/.codesight/libs.md b/.codesight/libs.md index 7769343..c7da5a2 100644 --- a/.codesight/libs.md +++ b/.codesight/libs.md @@ -38,14 +38,21 @@ - class Square - function fromAlgebraic - function offset +- `modules/api/src/main/scala/de/nowchess/api/bot/Bot.scala` + - class Bot + - function name + - function nextMove +- `modules/api/src/main/scala/de/nowchess/api/dto/ErrorEventDto.scala` — class ErrorEventDto, function apply +- `modules/api/src/main/scala/de/nowchess/api/dto/GameFullEventDto.scala` — class GameFullEventDto, function apply +- `modules/api/src/main/scala/de/nowchess/api/dto/GameStateEventDto.scala` — class GameStateEventDto, function apply - `modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala` + - function kingSquare - function withBoard - function withTurn - function withCastlingRights - function withEnPassantSquare - function withHalfMoveClock - - function withMove - - _...2 more_ + - _...4 more_ - `modules/api/src/main/scala/de/nowchess/api/player/PlayerInfo.scala` — class PlayerId, function apply - `modules/api/src/main/scala/de/nowchess/api/response/ApiResponse.scala` - class ApiResponse @@ -70,6 +77,7 @@ - `modules/bot/python/src/export.py` — function export_to_nbai: (weights_file, output_file, trained_by, train_loss) - `modules/bot/python/src/generate.py` — function play_random_game_and_collect_positions: (output_file, total_positions, samples_per_game, min_move, max_move, num_workers) - `modules/bot/python/src/label.py` — function normalize_evaluation: (cp_value, method, scale), function label_positions_with_stockfish: (positions_file, output_file, stockfish_path, batch_size, depth, verbose, normalize, num_workers) +- `modules/bot/python/src/lichess_importer.py` — function import_lichess_evals: (input_path, output_file, max_positions, min_depth, verbose) -> int - `modules/bot/python/src/tactical_positions_extractor.py` - function download_and_extract_puzzle_db: (url, output_dir) - function extract_puzzle_positions: (puzzle_csv, max_puzzles) -> Set[str] @@ -81,14 +89,10 @@ - function fen_to_features: (fen) - function find_next_version: (base_name) - function save_metadata: (weights_file, metadata) - - function train_nnue: (data_file, output_file, epochs, batch_size, lr, checkpoint, stockfish_depth, use_versioning, early_stopping_patience, weight_decay, subsample_ratio) - - function burst_train: (data_file, output_file, duration_minutes, epochs_per_season, early_stopping_patience, batch_size, lr, initial_checkpoint, stockfish_depth, use_versioning, weight_decay, subsample_ratio) + - function train_nnue: (data_file, output_file, epochs, batch_size, lr, checkpoint, stockfish_depth, use_versioning, early_stopping_patience, weight_decay, subsample_ratio, hidden_sizes) + - function burst_train: (data_file, output_file, duration_minutes, epochs_per_season, early_stopping_patience, batch_size, lr, initial_checkpoint, stockfish_depth, use_versioning, weight_decay, subsample_ratio, hidden_sizes) - class NNUEDataset - _...1 more_ -- `modules/bot/src/main/scala/de/nowchess/bot/Bot.scala` - - class Bot - - function name - - function nextMove - `modules/bot/src/main/scala/de/nowchess/bot/BotController.scala` - class BotController - function getBot @@ -139,7 +143,6 @@ - function bestMoveWithTime - function loop - function loop - - _...2 more_ - `modules/bot/src/main/scala/de/nowchess/bot/logic/MoveOrdering.scala` - class MoveOrdering - class OrderingContext @@ -149,6 +152,7 @@ - function getHistory - _...3 more_ - `modules/bot/src/main/scala/de/nowchess/bot/logic/TranspositionTable.scala` + - function advance - function probe - function store - function clear @@ -172,14 +176,15 @@ - function history - function getCurrentIndex - _...3 more_ +- `modules/core/src/main/scala/de/nowchess/chess/config/JacksonConfig.scala` — class JacksonConfig, function customize - `modules/core/src/main/scala/de/nowchess/chess/controller/Parser.scala` — class Parser, function parseMove - `modules/core/src/main/scala/de/nowchess/chess/engine/GameEngine.scala` - class GameEngine - - function isPendingPromotion - function board - function turn - function context - function canUndo + - function canRedo - _...11 more_ - `modules/core/src/main/scala/de/nowchess/chess/observer/Observer.scala` - function context @@ -189,6 +194,26 @@ - function subscribe - function unsubscribe - _...1 more_ +- `modules/core/src/main/scala/de/nowchess/chess/registry/GameRegistry.scala` + - class GameRegistry + - function store + - function get + - function update + - function generateId +- `modules/core/src/main/scala/de/nowchess/chess/registry/GameRegistryImpl.scala` + - class GameRegistryImpl + - function store + - function get + - function update + - function generateId +- `modules/core/src/main/scala/de/nowchess/chess/resource/GameResource.scala` + - function onGameEvent + - function createGame + - function getGame + - function streamGame + - function onGameEvent + - function resignGame + - _...9 more_ - `modules/io/src/main/scala/de/nowchess/io/GameContextExport.scala` — class GameContextExport, function exportGameContext - `modules/io/src/main/scala/de/nowchess/io/GameContextImport.scala` — class GameContextImport, function importGameContext - `modules/io/src/main/scala/de/nowchess/io/GameFileService.scala` @@ -238,29 +263,10 @@ - function allLegalMoves - function isCheck - function isCheckmate - - _...4 more_ + - _...5 more_ - `modules/rule/src/main/scala/de/nowchess/rules/sets/DefaultRules.scala` - class DefaultRules + - function positionOf - function loop - function toMoves - function loop -- `modules/ui/src/main/scala/de/nowchess/ui/Main.scala` — class Main, function main -- `modules/ui/src/main/scala/de/nowchess/ui/gui/ChessBoardView.scala` - - class ChessBoardView - - function updateBoard - - function updateUndoRedoButtons - - function showMessage - - function showPromotionDialog -- `modules/ui/src/main/scala/de/nowchess/ui/gui/ChessGUI.scala` - - class ChessGUIApp - - class ChessGUILauncher - - function getEngine - - function launch -- `modules/ui/src/main/scala/de/nowchess/ui/gui/GUIObserver.scala` — class GUIObserver -- `modules/ui/src/main/scala/de/nowchess/ui/gui/PieceSprites.scala` - - class PieceSprites - - function loadPieceImage - - class SquareColors -- `modules/ui/src/main/scala/de/nowchess/ui/terminal/TerminalUI.scala` — class TerminalUI, function start -- `modules/ui/src/main/scala/de/nowchess/ui/utils/PieceUnicode.scala` — function unicode -- `modules/ui/src/main/scala/de/nowchess/ui/utils/Renderer.scala` — class Renderer, function render diff --git a/.codesight/report.html b/.codesight/report.html new file mode 100644 index 0000000..06001f8 --- /dev/null +++ b/.codesight/report.html @@ -0,0 +1,198 @@ + + + + + +NowChessSystems — codesight report + + + + +

NowChessSystems

+
AI Context Map — generated by codesight
+ +
+raw-http + +unknown +scala + +
+ +
+
~20,573 tokens saved
+
+ Output: 5,297 tokens — Exploration cost without codesight: ~25,870 tokens — 149 files scanned +
+
+ +
+
0
Routes
+
0
Models
+
0
Components
+
63
Libraries
+
1
Env Vars
+
1
Middleware
+
383
Import Links
+
+ + + + + + + + +
+

Dependency Hot Files

+
+
+
modules/api/src/main/scala/de/nowchess/api/game/GameContext.scala
+
imported by 64 files
+
+
+
+
modules/api/src/main/scala/de/nowchess/api/move/Move.scala
+
imported by 44 files
+
+
+
+
modules/api/src/main/scala/de/nowchess/api/board/Square.scala
+
imported by 40 files
+
+
+
+
modules/api/src/main/scala/de/nowchess/api/board/Color.scala
+
imported by 35 files
+
+
+
+
modules/api/src/main/scala/de/nowchess/api/board/Board.scala
+
imported by 19 files
+
+
+
+
modules/api/src/main/scala/de/nowchess/api/board/Piece.scala
+
imported by 18 files
+
+
+
+
modules/api/src/main/scala/de/nowchess/api/board/PieceType.scala
+
imported by 17 files
+
+
+
+
modules/rule/src/main/scala/de/nowchess/rules/sets/DefaultRules.scala
+
imported by 17 files
+
+
+
+
modules/rule/src/main/scala/de/nowchess/rules/RuleSet.scala
+
imported by 11 files
+
+
+
+
modules/io/src/main/scala/de/nowchess/io/fen/FenParser.scala
+
imported by 10 files
+
+
+
+
modules/api/src/main/scala/de/nowchess/api/board/CastlingRights.scala
+
imported by 9 files
+
+
+
+
modules/api/src/main/scala/de/nowchess/api/game/DrawReason.scala
+
imported by 7 files
+
+
+
+
+ + +
+

Environment Variables

+ + + + + + + +
VariableStatusSource
STOCKFISH_PATHrequiredmodules/bot/python/nnue.py
+
+ + +
+

Middleware

+
+
+
generate custom
+
modules/bot/python/src/generate.py
+
+
+
+ + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml index c59ee8d..08b68c3 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -15,7 +15,6 @@ diff --git a/.idea/runConfigurations/NowChessSystems_modules_core_main.xml b/.idea/runConfigurations/NowChessSystems_modules_core_main.xml new file mode 100644 index 0000000..1415e64 --- /dev/null +++ b/.idea/runConfigurations/NowChessSystems_modules_core_main.xml @@ -0,0 +1,33 @@ + + + + + + + + + true + true + false + false + false + false + false + dev + + + + + \ No newline at end of file diff --git a/.idea/scala_compiler.xml b/.idea/scala_compiler.xml index 3af8876..a99d21e 100644 --- a/.idea/scala_compiler.xml +++ b/.idea/scala_compiler.xml @@ -5,7 +5,7 @@