# thewybrake09/joker-pool-debug architecture

> Architecture diagram of the GitHub repository thewybrake09/joker-pool-debug, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/thewybrake09/joker-pool-debug
- Repository: https://github.com/thewybrake09/joker-pool-debug

## Overview

Balatro Joker Pool Debug is a Steamodded mod for auditing Joker-pool RNG. A player chooses a sample target and starts a run from the Shop or Select Blind screen; the mod runs samples in batches, respecting native unlock and deck requirements, then reports pool coverage and card hit rates to joker.txt. The README documents this workflow and output, but no source excerpts were provided, so internal call ownership and implementation details cannot be verified.

Main entry points: [`debug.lua`](https://github.com/thewybrake09/joker-pool-debug/blob/main/debug.lua) (Batch Runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_player(("Player"))
node_balatro["Balatro"]
node_steamodded["Steamodded"]
node_mod["Pool Auditor<br/>[debug.lua]"]
node_batch["Batch Runner<br/>[debug.lua]"]
node_jokerpool["Joker Pools"]
node_audit["Pool Metrics<br/>[debug.lua]"]
node_log["joker.txt"]

node_player -->|"sets target / starts"| node_mod
node_steamodded -->|"loads mod"| node_mod
node_mod -->|"starts batches"| node_batch
node_batch -->|"simulates rolls"| node_jokerpool
node_balatro -->|"applies game rules"| node_jokerpool
node_batch -->|"records hits"| node_audit
node_audit -->|"exports metrics"| node_log

click node_mod "https://github.com/thewybrake09/joker-pool-debug/blob/main/debug.lua"
click node_batch "https://github.com/thewybrake09/joker-pool-debug/blob/main/debug.lua"
click node_audit "https://github.com/thewybrake09/joker-pool-debug/blob/main/debug.lua"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_player,node_balatro,node_steamodded,node_jokerpool,node_log toneIndigo
class node_mod,node_batch,node_audit toneTeal
```

## Components

### Other components

- **Player**
- **Balatro**
- **Steamodded**
- [Pool Auditor](https://github.com/thewybrake09/joker-pool-debug/blob/main/debug.lua): `debug.lua`
- [Batch Runner](https://github.com/thewybrake09/joker-pool-debug/blob/main/debug.lua): `debug.lua`
- **Joker Pools**
- [Pool Metrics](https://github.com/thewybrake09/joker-pool-debug/blob/main/debug.lua): `debug.lua`
- **joker.txt**

## Connections

- Player → Pool Auditor: sets target / starts
- Steamodded → Pool Auditor: loads mod
- Pool Auditor → Batch Runner: starts batches
- Batch Runner → Joker Pools: simulates rolls
- Balatro → Joker Pools: applies game rules
- Batch Runner → Pool Metrics: records hits
- Pool Metrics → joker.txt: exports metrics
