增加游戏玩法界面和各个弹窗初版

This commit is contained in:
zpx committed 2026-11-20 18:51:48 +08:00
1 parent e84e14783e
commit eb48d8e845
211 files changed
+59920 -21

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
/** 队列只控制未来普通局;STOP 不回滚已经提交的当前局。 / The queue controls future paid rounds; stopping never rolls back the committed spin. */
export class AutoSpinQueue {
active = false;
remaining = 0;
start(count: number): void {
if (![10, 25, 50, 100].includes(count) || this.active) throw new Error('Invalid automatic spin request');
this.remaining = count; this.active = true;
}
consume(): void {
if (!this.active || this.remaining <= 0) throw new Error('No automatic spin remains');
this.remaining--;
}
stop(): void { this.active = false; this.remaining = 0; }
}