@extends('admin.layouts.app') @section('title', '五子棋对局记录') @section('content') @php require resource_path('views/admin/partials/list-theme.php'); @endphp @php $tableCellClass = 'px-4 py-3'; $badgeClass = $adminListBadgeBaseClass; @endphp
查询全站所有的五子棋人机及 PvP 对局。
| 赛事ID | 创建时间 | 模式 | 黑方 (发起) | 白方 (迎战) | 状态 | 胜负 |
|---|---|---|---|---|---|---|
| #{{ $game->id }} | {{ $game->created_at ? $game->created_at->format('m-d H:i') : '—' }} | @if ($game->mode === 'pve') 单机 PvE(L{{ $game->ai_level }}) @else 在线 PvP @endif | {{ $game->playerBlack?->username ?? '已注销/未知' }} | @if ($game->mode === 'pve') AI 机器人 @else {{ $game->playerWhite?->username ?? '已注销/未加入' }} @endif | @php $s = match ($game->status) { 'waiting' => ['label' => '等待中', 'bg' => 'bg-amber-100 text-amber-600 border-amber-200'], 'playing' => ['label' => '对弈中', 'bg' => 'bg-blue-100 text-blue-600 border-blue-200'], 'finished' => ['label' => '已结束', 'bg' => 'bg-emerald-100 text-emerald-700 border-emerald-200'], default => ['label' => $game->status, 'bg' => 'bg-gray-100 text-gray-600 border-gray-200'], }; @endphp {{ $s['label'] }} | @if ($game->status !== 'finished') - @else @if ($game->winner === 1) ⚫ 黑胜 @elseif ($game->winner === 2) ⚪ 白胜 @else 平局撤销 @endif @endif |
| 暂无记录 | ||||||