{{-- The math literacy 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 mathlit_game/guest. --}} @extends($isStudent ? 'layouts.gamification' : 'layouts.app') @section('title', __('Математическая грамотность')) @section('gami-active', 'mathlit') @section($isStudent ? 'gami-content' : 'content') @include('mathlit_game._game', ['saveMode' => $isStudent ? 'student' : 'other', 'duel' => $duel]) @if ($isStudent) @php $modeLabels = ['seq' => __('Последовательности'), 'percent' => __('Проценты'), 'word' => __('Текстовые задачи'), 'mix' => __('Всё вместе')]; $difficultyLabels = [1 => __('Лёгкий'), 2 => __('Средний'), 3 => __('Сложный')]; @endphp
{{ __('Мои результаты') }}🏆 {{ __('Рейтинг игры') }}
@if (empty($results))
{{ __('Сыграйте первый раунд — результат появится здесь.') }}
@else @if (! empty($best))
@foreach ($modeLabels as $key => $label) @isset($best[$key]) {{ __(':label: рекорд :best в минуту', ['label' => $label, 'best' => $best[$key]]) }} @endisset @endforeach
@endif
@foreach ($results as $r) @endforeach
{{ __('Дата') }}{{ __('Режим') }}{{ __('Сложность') }}{{ __('Время') }}{{ __('Счёт') }}
{{ \Illuminate\Support\Carbon::parse($r->created_at)->format('d.m H:i') }} {{ $modeLabels[$r->mode] ?? $r->mode }} {{ $difficultyLabels[(int) $r->difficulty] ?? $r->difficulty }} {{ $r->duration === null ? '—' : ((int) $r->duration >= 60 ? ((int) $r->duration / 60).__(' мин') : (int) $r->duration.__(' сек')) }} {{ (int) $r->score }}/{{ (int) $r->total }}
@endif
@endif @endsection