We'll start with the core flow of creating, accepting, and manually resolving bets. Later on, we will add automatic bet resolution based on event results.
Core Flow
A player creates a bet with a point wager, description (plain text), opponent, and opponent wager.
The wagers must be at least 1 point, and no higher than the score of the player.
The opponent may accept or reject the bet.
If one of the player's scores is now lower than their wager, the bet cannot be accepted.
The requestor may also cancel the bet before the opponent accepts or rejects.
Upon acceptance, the wager amount is deducted from both players' scores.
Those points are considered "tied up" in the bet.
The GM then specifies who won the bet, or if the bet is a "push" (tie / no winner).
The winning player receives the sum of the wager amounts (the amount previously deducted from their own score, plus the amount deducted from their opponent). If the bet is a push, both players get their points back.
Notes:
The GM may cancel any bet at any time, so long as the bet is not resolved or already canceled.
Implementation Notes:
We will probably need pages for the following:
Create new bet
View bet requests (includes buttons to accept, reject, or cancel bets)
We'll start with the core flow of creating, accepting, and manually resolving bets. Later on, we will add automatic bet resolution based on event results.
Core Flow
Notes:
Implementation Notes:
We will probably need pages for the following:
bet
table structure:bet_status
database enum: