Towers

Climb a tower row by row, picking a safe cell on each level. Each safe pick lifts the multiplier; one wrong pick busts. Cash out any time. Multi-action.

Slug: towers · Type: multi-action · TS types: @jackpot-studio/jps-proto/towers

A round is: start (debits, builds the board) → one reveal per row → cashout. An instant variant climbs a pre-chosen path in one call. difficulty controls how many safe cells per row.

Start

RequestQuery.start

Field Type Notes
amount string Wager, decimal string.
difficulty int Difficulty level (sets the safe-cell ratio per row).
{ "start": { "amount": "1.00", "difficulty": 1 } }

Response carries the opening state. Keep the roundId.

Reveal

RequestQuery.reveal

Field Type Notes
field int Cell index within the current row.
roundId string The open round.
{ "reveal": { "field": 1, "roundId": "9f1c…" } }
  • Safe: reveal.result absent; state.rounds gains the row, multiplier updates, advance to the next row.
  • Bust: round ends, state reveals the board, result carries the (zero) payout.

Cashout

RequestQuery.cashout: { "roundId": "9f1c…" }. Settles at the current multiplier; cashout.result carries { payout, multiplier }.

Instant

RequestQuery.instant: { amount, difficulty, fields: [int] } — climbs the listed fields (one per row) in a single call. instant.result carries the outcome.

State

GameState:

Field Type Notes
active bool
difficulty int
board Row[] Each Row is { cells: [int] }. Safe/mine layout — revealed on bust/cashout.
rounds Round[] Picks so far: { field, multiplier, crowns }, where crowns is the safe-cell Row for that level.
cashedOut bool

Verify

VerifyRequest: { difficulty }. Response returns the full board for that difficulty.

// request message
{ "difficulty": 1 }
// response message
{ "board": [ { "cells": [1, 0, 1] }, { "cells": [0, 1, 1] } ] }