feat: implement bot functionality with difficulty levels and integrate Polyglot opening book

This commit is contained in:
2026-04-07 14:54:27 +02:00
committed by Janis
parent 3b945da958
commit 8e208b8a25
14 changed files with 1150 additions and 53 deletions
+1
View File
@@ -64,6 +64,7 @@ dependencies {
implementation(project(":modules:rule"))
implementation(project(":modules:api"))
implementation(project(":modules:io"))
implementation(project(":modules:bot"))
// ScalaFX dependencies
implementation("org.scalafx:scalafx_3:${versions["SCALAFX"]!!}")
@@ -1,5 +1,7 @@
package de.nowchess.ui
import de.nowchess.api.board.Color.Black
import de.nowchess.bot.{BotDifficulty, ClassicalBot, PolyglotBook}
import de.nowchess.chess.engine.GameEngine
import de.nowchess.ui.terminal.TerminalUI
import de.nowchess.ui.gui.ChessGUILauncher
@@ -12,6 +14,11 @@ object Main:
// Create the core game engine (single source of truth)
val engine = new GameEngine()
val book = PolyglotBook("/home/janis/Workspaces/IntelliJ/NowChess/NowChessSystems/modules/bot/codekiddy.bin")
engine.setOpponentBot(ClassicalBot(BotDifficulty.Easy, book = Some(book)), Black);
// Launch ScalaFX GUI in separate thread
ChessGUILauncher.launch(engine)