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 14e88470de
commit 23a5c763c5
24 changed files with 488 additions and 3 deletions
@@ -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()