@extends('admin.layouts.app') @section('title', '五子棋对局记录') @section('content')
{{-- 页头 --}}

♟️ 五子棋历史记录

查询全站所有的五子棋人机及 PvP 对局。

⚙️ 游戏配置
{{-- 统计卡片 --}}
{{ number_format($summary['total_games']) }}
历史对局数
{{ number_format($summary['completed']) }}
正常完赛
{{ number_format($summary['pvp_count']) }}
PvP 人人对战数
{{ number_format($summary['today_games']) }}
今日新建对局
{{-- 期数列表 --}}
@forelse ($games as $game) @empty @endforelse
赛事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'], 'playing' => ['label' => '对弈中', 'bg' => 'bg-blue-100 text-blue-600'], 'finished' => ['label' => '已结束', 'bg' => 'bg-emerald-100 text-emerald-700'], default => ['label' => $game->status, 'bg' => 'bg-gray-100 text-gray-600'], }; @endphp {{ $s['label'] }} @if ($game->status !== 'finished') - @else @if ($game->winner === 1) ⚫ 黑胜 @elseif($game->winner === 2) ⚪ 白胜 @else 平局撤销 @endif @endif
暂无记录
@if ($games->hasPages())
{{ $games->links() }}
@endif
@endsection