- Introduced a new `spin_sessions` table to track user spin activities. - Updated the API to include a new endpoint for spinning games, allowing users to place bets and specify spin counts. - Enhanced game information structure and added validation for bets and spin counts. - Implemented the `Forest Fortune` slot game mechanics, including payline evaluation and scatter functionality. - Updated dependencies in `pyproject.toml` for development and added `httpx` for HTTP requests. - Added unit tests for the new slot mechanics and API endpoints to ensure functionality and reliability.
25 lines
500 B
Python
25 lines
500 B
Python
from __future__ import annotations
|
|
|
|
import random
|
|
from typing import Any, Protocol, Sequence
|
|
|
|
|
|
class Rng(Protocol):
|
|
def random(self) -> float: ...
|
|
|
|
def choices(
|
|
self,
|
|
population: Sequence[Any],
|
|
weights: Sequence[float] | None = None,
|
|
*,
|
|
k: int = 1,
|
|
) -> list[Any]: ...
|
|
|
|
|
|
def system_rng() -> random.SystemRandom:
|
|
return random.SystemRandom()
|
|
|
|
|
|
def seeded_rng(seed: int | str | bytes | bytearray) -> random.Random:
|
|
return random.Random(seed)
|