Files
vyryi-back/app/slots/rng.py
Redsandy 5125b52583 Add spin session functionality and update game mechanics
- 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.
2026-08-12 15:27:24 +03:00

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)