{{-- The mental math game for a logged-in user. Students get it inside the gamification tabs, with their saved rounds below; any other role gets the plain site layout and can play, but nothing is saved. Guests get math_game/guest. --}} @extends($isStudent ? 'layouts.gamification' : 'layouts.app') @section('title', __('Устный счёт')) @section('gami-active', 'math') @section($isStudent ? 'gami-content' : 'content') @include('math_game._game', ['saveMode' => $isStudent ? 'student' : 'other', 'duel' => $duel]) @if ($isStudent) @php $opSymbols = ['add' => '+', 'sub' => '−', 'mul' => '×', 'div' => '÷', 'sq' => 'x²']; $difficultyLabels = [1 => __('Лёгкий'), 2 => __('Средний'), 3 => __('Сложный')]; @endphp
| {{ __('Дата') }} | {{ __('Действия') }} | {{ __('Сложность') }} | {{ __('Время') }} | {{ __('Верно') }} |
|---|---|---|---|---|
| {{ \Illuminate\Support\Carbon::parse($r->created_at)->format('d.m H:i') }} | {{ implode(' ', array_map(fn ($op) => $opSymbols[$op] ?? $op, explode(',', $r->ops))) }} | {{ $difficultyLabels[(int) $r->difficulty] ?? $r->difficulty }} | {{ (int) $r->duration >= 60 ? ((int) $r->duration / 60).__(' мин') : (int) $r->duration.__(' сек') }} | {{ (int) $r->correct }}/{{ (int) $r->answered }} |