# tensey3/combo_training architecture

> Architecture diagram of the GitHub repository tensey3/combo_training, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tensey3/combo_training
- Repository: https://github.com/tensey3/combo_training

## Overview

##### Project type and purpose
- This is a standalone Java CLI tool for verifying fighting-game command inputs (8 directional + 6 limb buttons).
- No web frontend or DB—the focus is on real-time input capture, timing, combo-recognition logic, and console output.

##### File structure
- Top-level “.java” files (Main.java, Keyset.java, Timers.java, combo.java, Flam.java) define your core modules.
- There are no subdirectories for “src”, so each .java file represents a logical component.
- The rest of the tree (filter-repo, hooks, objects, etc.) is Git metadata – not part of your runtime architecture.

##### Extract key architectural roles from the code
- Main.java: application entry point, initializes subsystems, ties everything together.
- Keyset.java: encapsulates reading and maintaining the current state of all input buttons and directions.
- Timers.java: tracks timestamps and enforces timing windows for recognizing sequences.
- combo.java: implements core combo-recognition algorithms (sequences of inputs within timing constraints).
- Flam.java: likely handles special commands (e.g., rapid inputs, “flam” techniques) or additional preprocessing.

– Input Device (e.g., Gamepad / Keyboard)
– Input Handler (Keyset module)
– Timing Manager (Timers module)
– Combo Recognition Engine (combo + Flam modules)
– Output Renderer (Console/UI)
1. User presses buttons → Input Device →
2. Input Handler polls state → pushes events →
3. Timing Manager tags each event with timestamps →
4. Combo Recognition Engine consumes timed events, runs algorithms →
5. Recognized commands emitted to Output Renderer →
6. Console displays feedback (success/failure).
c. Architectural pattern:
– A simple pipeline (Layered) pattern: Input → Processing → Output
– Each module is loosely couple­d (Main.java wires them at startup)
d. Technologies/libraries:
– Java SE (no external frameworks)
– CLI / System.in, System.out

##### Final checklist
– All major modules are represented.
– Labels include both component names and the filename that implements them.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Main orchestrator
    Main["Main (Main.java)"]:::main

    %% Pipeline components
    InputDevice["Input Device\n(Gamepad/Keyboard)"]:::input
    Keyset["Input Handler\n(Keyset.java)"]:::input
    Timers["Timing Manager\n(Timers.java)"]:::processing
    Flam["Recognition Plugin\n(Flam.java)"]:::processing
    comboEngine["Combo Recognition Engine\n(combo.java)"]:::processing
    Output["Output Renderer\n(Console)"]:::output

    %% Orchestration wiring
    Main -.-> Keyset
    Main -.-> Timers
    Main -.-> Flam
    Main -.-> comboEngine

    %% Data flow
    Main --> InputDevice
    InputDevice --> Keyset
    Keyset --> Timers
    Timers --> Flam
    Flam --> comboEngine
    comboEngine --> Output

    %% Click events
    click Main "https://github.com/tensey3/combo_training/blob/main/Main.java"
    click Keyset "https://github.com/tensey3/combo_training/blob/main/Keyset.java"
    click Timers "https://github.com/tensey3/combo_training/blob/main/Timers.java"
    click comboEngine "https://github.com/tensey3/combo_training/blob/main/combo.java"
    click Flam "https://github.com/tensey3/combo_training/blob/main/Flam.java"

    %% Styling
    classDef input fill:#B3DFFF,stroke:#333,stroke-width:1px
    classDef processing fill:#C2F0C2,stroke:#333,stroke-width:1px
    classDef output fill:#FFD699,stroke:#333,stroke-width:1px
    classDef main fill:#F2F2F2,stroke:#333,stroke-width:1px,stroke-dasharray: 5 5
```
