feat: Gui added (not done, not reviewed)
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user