Files
fast/format/GameInterface.php
xiadc 94a540ac96 feat(shopro): 优化比赛模块功能和流程
- 新增赛制说明接口和页面
- 实现比赛列表和对阵详情页面
- 添加比赛计分功能
- 优化比赛报名和参赛者分配逻辑
- 重构赛制配置和对阵安排方法
2025-05-27 08:51:27 +08:00

29 lines
973 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace format;
/*
赛制文件
1. 团队类型1双打2单打3团队
2. 规则类型1八人转2超八转3混双转4固搭转5固定擂6活动擂7转转8分区转9擂台赛10守擂赛11追分赛12固搭追分赛13大循环群内赛14两队PK赛15战队淘汰赛16单项淘汰赛17分区循环淘汰赛
3. 需要引入新赛制请创建新的类文件,类文件需要实现GameInterface接口,并且文件名为`Game + 团队类型代码 + 规则类型代码.php`。
如:赛制为双打+转转则文件为format/Game17.php。
赛制为单打+擂台赛则文件为format/Game29.php。
*/
interface GameInterface
{
// 赛制说明
public function describe(): string;
// 首轮对阵安排
public function match($game, $users): array;
// 下一轮对阵安排
public function next($game, $math): array;
// 奖金分配
public function prize($rank): array;
}