This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Console Jack is a console-based, text-graphics implementation of the classic casino game, aiming to be a "Card RPG" where players progress through casino ranks. Built using Java 21 with Lanterna for terminal UI rendering.
mvn compile- Compile the projectmvn exec:java- Run the application directlymvn clean package- Build JAR with dependenciesjava -jar target/console-jack-1.0-SNAPSHOT-jar-with-dependencies.jar- Run the packaged JAR
mvn clean package -Pwindows- Package for Windows (createsbuild-win/)mvn clean package -Pmac- Package for macOS (createsbuild-mac/)mvn clean package -Plinux- Package for Linux (createsbuild-linux/)
- Qodana static analysis configured in
qodana.yaml(usesjetbrains/qodana-jvm-community:2025.1)
The application uses a two-layer access model:
Public manager facades (game code uses these — static utility classes):
EntityManager— create/destroy entities, register ECS systemsMasterManager— engine lifecycle control (e.g. graceful shutdown)StateMachineManager— state push/pop/replace operationsRenderManager— rendering commands and utilitiesInputManager— input event distributionAudioManager— sound playback control
Internal coordinators / subsystems (engine internals — do not access from game code):
MasterSubsystem.INSTANCE— main game loop (enum singleton)RenderSubsystem.INSTANCE— Lanterna rendering (enum singleton)InputSubsystem.INSTANCE— keyboard input (enum singleton)AudioSubsystem.INSTANCE— audio management (enum singleton)EntityCoordinator.INSTANCE— ECS pool and system registry (enum singleton)StateMachineCoordinator.INSTANCE— state machine implementation (enum singleton)
- Master Thread: Runs the main game loop at 8 UPS (125ms per update)
- Render Thread: Handles terminal UI rendering using Lanterna
- Input Thread: Processes keyboard/input events
- Audio Thread: Manages audio subsystem
- State machine managed by
StateMachineManager(static facade) - States implement
LoopableStateinterface - Initial state:
MainMenuState - State transitions via push/pop/replace operations
EntityManager: Public API for creating/destroying entities and registering systemsEntityCoordinator: Internal singleton managingEntityPooland ordered system list- Components:
Position,Visual,ScalableVisual,Layer,Card,CardArt,CardSprite - Systems:
DisplayListSystemfor rendering - ECS updates run in the main game loop via
EntityCoordinator
net.luxsolari.engine.*: Core game engineecs/: Entity-Component-System implementationmanager/: Static utility managers (Input, Audio, Render, StateMachine)systems/: Subsystem interfaces and implementationsstates/: Base state interfaces
net.luxsolari.game.*: Game-specific implementationstates/: Concrete game states (MainMenu, Gameplay, Pause)ecs/: Game-specific components
- Lanterna 3.1.2: Terminal/console UI framework
- Java 21: Language version with preview features enabled
- Maven: Build system with multi-platform packaging profiles
Main class: net.luxsolari.game.Main - Delegates to MainEngine.bootstrap(), which loads logging config and starts MasterSubsystem.INSTANCE.run()
- Enter architect mode when commanded with either "Enter Architect Mode" or "/architect-mode". Use docs/ARCHITECT_MODE.md ruleset.
- Enter RIPER mode when commanded with either "Enter RIPER Mode" or "/riper-mode". Use docs/RIPER_MODE.md ruleset.
- Always refer to main docs inside the @docs/ directory and base your work on them.
- Always check documentation is aligned with changes, refactors or modifications you made to the code. If documentation gaps exist, update relevant docs or create new where appropiate. Make sure all documentation for the projects lives under the @docs/ directory.
- When making architectural changes or major refactors, always review your work to ensure the documentation is aligned with the codebase.