- Updated API types to replace `GameStub` with `GameInfo` and added `SessionSpinResult` and `SpinOutcome` types. - Modified API requests in `api.ts` to use the new game types. - Implemented the `ForestFortuneGame` component with game logic, including spinning mechanics and win animations. - Created supporting components: `CoinFlight`, `ReelColumn`, `WinCounter`, and `WinLinesOverlay` for game UI. - Added CSS styles for the Forest Fortune game layout and animations. - Updated `GamePage` and `HomePage` to integrate the new game and reflect its status correctly.
73 lines
1.2 KiB
TypeScript
73 lines
1.2 KiB
TypeScript
export type User = {
|
|
id: number
|
|
telegram_id: number | null
|
|
username: string | null
|
|
first_name: string | null
|
|
balance: string
|
|
agreement_accepted: boolean
|
|
agreement_accepted_at: string | null
|
|
created_at: string
|
|
}
|
|
|
|
export type Deposit = {
|
|
id: number
|
|
amount: string
|
|
created_at: string
|
|
}
|
|
|
|
export type Wallet = {
|
|
balance: string
|
|
deposits: Deposit[]
|
|
}
|
|
|
|
export type GameInfo = {
|
|
slug: string
|
|
title: string
|
|
description: string
|
|
status: string
|
|
min_bet: string
|
|
max_bet: string
|
|
min_spin_count: number
|
|
max_spin_count: number
|
|
}
|
|
|
|
/** @deprecated use GameInfo */
|
|
export type GameStub = GameInfo
|
|
|
|
export type TokenResponse = {
|
|
access_token: string
|
|
token_type: string
|
|
}
|
|
|
|
export type PaylineWin = {
|
|
line_index: number
|
|
symbol: string
|
|
count: number
|
|
amount: string
|
|
path: number[]
|
|
}
|
|
|
|
export type SpinOutcome = {
|
|
index: number
|
|
grid: string[][]
|
|
line_wins: PaylineWin[]
|
|
scatter_count: number
|
|
scatter_win: string
|
|
total_win: string
|
|
level: number
|
|
multiplier: number
|
|
meta_triggered: boolean
|
|
}
|
|
|
|
export type SessionSpinResult = {
|
|
slug: string
|
|
bet: string
|
|
spin_count: number
|
|
total_bet: string
|
|
total_win: string
|
|
max_level: number
|
|
trigger_count: number
|
|
balance: string
|
|
spins: SpinOutcome[]
|
|
}
|