feat: Refactor bot participant handling to include player information and update package structure

This commit is contained in:
2026-04-16 21:18:44 +02:00
parent f8d2858d98
commit 8ecfbd6266
10 changed files with 31 additions and 20 deletions
@@ -1,5 +1,7 @@
package de.nowchess.ui
import de.nowchess.api.game.{BotParticipant, Human}
import de.nowchess.api.player.{PlayerId, PlayerInfo}
import de.nowchess.bot.util.PolyglotBook
import de.nowchess.bot.BotDifficulty
import de.nowchess.ui.terminal.TerminalUI
@@ -15,10 +17,10 @@ object Main:
// Create the core game engine (single source of truth)
val engine = new de.nowchess.chess.engine.GameEngine(
participants = Map(
de.nowchess.api.board.Color.White -> de.nowchess.chess.engine.BotParticipant(
de.nowchess.api.board.Color.White -> BotParticipant(
de.nowchess.bot.bots.HybridBot(BotDifficulty.Easy, book = Some(book)),
),
de.nowchess.api.board.Color.Black -> de.nowchess.chess.engine.Human,
de.nowchess.api.board.Color.Black -> Human(PlayerInfo(PlayerId("p1"), "Player 1")),
),
)