feat: skryté multiplayerové minihry přes websocket
CI / Generate TypeScript types (push) Canceled after 7s
CI / Server unit tests (push) Canceled after 0s
CI / Build server (push) Canceled after 0s
CI / Build client (push) Canceled after 0s
CI / Playwright E2E tests (push) Canceled after 0s
CI / Build and push Docker image (push) Canceled after 0s
CI / Notify (push) Canceled after 0s

Minihry se otevírají trojklikem na logo a napsáním kódu hry
("help" vypíše seznam do konzole prohlížeče):
- reakce: reakční hra, 3 kola, pořadí podle součtu časů
- snake: had pro více hráčů, simulaci drží server
- tetris: battle Tetris s odpadními řádky a lokálním tréninkem
- pong: Pong 1v1, ovládání myší i klávesami, bot se 4 obtížnostmi
- kresleni: kreslení a hádání jídel z dnešních menu

Ikony her se řídí zvoleným vzhledem. Stav her je v paměti serveru,
předpokládá se jedna replika.
This commit is contained in:
batmanisko committed 2026-10-12 14:25:45 +02:00
1 parent abeee19259
commit 6cb1214f08
28 files changed
+5050 -2

No files matched your search

+114
View File
@@ -0,0 +1,114 @@
.duel-invite {
position: fixed;
left: 16px;
bottom: 16px;
z-index: 1040;
padding: 10px 16px;
border: none;
border-radius: 999px;
background: var(--luncher-primary, #198754);
color: #fff;
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
cursor: pointer;
animation: duel-pulse 1.6s ease-in-out infinite;
}
@keyframes duel-pulse {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.04); }
}
.reaction-duel-modal {
.duel-arena {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 280px;
border-radius: 12px;
color: #fff;
user-select: none;
cursor: pointer;
touch-action: manipulation;
transition: background-color 0.05s;
&.waiting { background: #b02a37; }
&.go { background: #198754; }
&.done { background: #495057; }
&.early { background: #fd7e14; }
}
.duel-round {
opacity: 0.85;
}
.duel-signal {
font-size: 3rem;
font-weight: 700;
margin: 8px 0;
}
.duel-hint {
opacity: 0.85;
font-size: 0.9rem;
}
.duel-players {
columns: 2;
}
.duel-podium {
display: flex;
justify-content: center;
align-items: flex-end;
gap: 12px;
margin-bottom: 16px;
}
.duel-place {
flex: 0 1 160px;
padding: 12px 8px;
border-radius: 10px;
text-align: center;
background: var(--bs-tertiary-bg);
// Vítěz uprostřed a nejvýš, jako na stupních vítězů
&.place-1 { order: 2; padding-top: 28px; }
&.place-2 { order: 1; }
&.place-3 { order: 3; }
}
.duel-medal {
font-size: 2.2rem;
}
.duel-place-name {
font-weight: 700;
overflow-wrap: anywhere;
}
.duel-place-time {
opacity: 0.75;
font-size: 0.9rem;
}
.duel-last {
text-align: center;
}
.duel-results .duel-loser td {
background: rgba(220, 53, 69, 0.15);
}
}
// Nenápadné potvrzení, že logo přijalo sérii kliknutí a čeká na tajné slovo
.navbar-brand.duel-armed {
display: inline-block;
animation: duel-wiggle 0.35s ease-in-out 2;
}
@keyframes duel-wiggle {
0%, 100% { transform: rotate(0); }
25% { transform: rotate(-4deg); }
75% { transform: rotate(4deg); }
}