The machine in one breath
Dan: it's a four-stroke. Intake (coin comes in and authorizes), compression (handle stroke stores energy), power (kicker fires, reels spin, clock times the stops), exhaust (payout and return home). One cycle per pull, and every stroke sets up the next one. The handle is the camshaft — one input that sequences everything.
Matt: it's a single function call. play(quarter) — validate input, allocate, run a randomized process with a timer, evaluate the result against a lookup table, return the payout, and clean up. If cleanup doesn't run, the next call fails. Our missing click was a cleanup bug.
Both of us: the whole machine is six systems that hand off to each other in a fixed order.
flowchart TB
subgraph AUTH["1 · The bouncer — coin authorization"]
A1[Coin head] --> A2[Escalator] --> A3[Detector] --> A4[Handle unlocked]
end
subgraph INV["2 · The teller — coin inventory"]
C1[Routing point] --> C2[(Payout tube)]
C2 -->|overflow| C5{Splitter}
C5 -->|a share| C3[(Jackpot — progressive)]
C5 -->|the rest| C4[(Cash box)]
end
subgraph DRV["3 · The camshaft — handle & operating fork"]
R1[Handle] --> R2[Operating fork]
end
subgraph SPIN["4 · The engine — reels & clock"]
R3[Kicker] --> R4[Reels spin]
T1[Clock released] --> T2[Stops drop 1-2-3]
T2 --> R4
end
subgraph COMP["5 · The punch-card reader — hammers & holes"]
P1[Code discs] --> P2[Hammers / fingers] --> P3[Payout levers] --> P4[Slides]
end
subgraph OUT["6 · Cleanup — payout & reset"]
O1[Quarters metered] --> O4[Cup]
O2[Jackpot trip] --> O3[Trap door] --> O4
O4 --> O5[Everything home. Handle relocks. The last click.]
end
A3 --> C1
A4 --> R1
R2 --> R3
R2 --> T1
R2 --> P4
R4 --> P1
P4 --> O1
P3 --> O2
C2 --> O1
C3 --> O3Nothing in it is electric. Levers are the logic gates, springs are the defaults, cams are the sequencer, a governed gear train is the clock, holes in discs are the data, slide travel is the number, and gravity is the bus that moves the coins around.
2.1 The whole cycle as a timeline
sequenceDiagram
participant C as Coin system
participant H as Handle
participant O as Operating fork
participant R as Reels
participant T as Clock
participant P as Hammers & slides
participant J as Jackpot
participant X as Reset
C->>H: one quarter, one pull
H->>O: stroke
O->>R: cock and fire the kicker
O->>P: position the slides
O->>T: release the clock
T->>R: stop 1 … stop 2 … stop 3
R->>P: discs presented to the hammers
P->>P: which hammers drop?
alt ordinary win
P->>P: meter N quarters from the tube
else BAR BAR BAR
P->>J: trip the cabinet lever
J->>J: trap door dumps
else nothing
P->>P: no slide selected
end
O->>X: return stroke
X->>P: slides and hammers home
X->>T: clock home
X->>J: advance the jackpot reset
X->>C: escalator steps, detector resets
X->>H: handle relocks — CLICK