feat: Gui added (not done, not reviewed)

This commit is contained in:
shahdlala66
2026-04-01 00:34:00 +02:00
committed by Janis
parent ea5fc0ebf5
commit 9e6766e1b2
24 changed files with 488 additions and 3 deletions
+1
View File
@@ -50,6 +50,7 @@ dependencies {
implementation(project(":modules:core"))
implementation(project(":modules:api"))
implementation(project(":modules:gui"))
testImplementation(platform("org.junit:junit-bom:5.13.4"))
testImplementation("org.junit.jupiter:junit-jupiter")
@@ -2,14 +2,20 @@ package de.nowchess.ui
import de.nowchess.chess.engine.GameEngine
import de.nowchess.ui.terminal.TerminalUI
import de.nowchess.gui.ChessGUILauncher
/** Application entry point - starts the Terminal UI for the chess game. */
/** Application entry point - starts both GUI and Terminal UI for the chess game.
* Both views subscribe to the same GameEngine via Observer pattern.
*/
object Main:
def main(args: Array[String]): Unit =
// Create the core game engine (single source of truth)
val engine = new GameEngine()
// Create and start the terminal UI
// Launch ScalaFX GUI in separate thread
ChessGUILauncher.launch(engine)
// Create and start the terminal UI (blocks on main thread)
val tui = new TerminalUI(engine)
tui.start()