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

+119
View File
@@ -0,0 +1,119 @@
// Pozvánka Tetrisu nad pozvánkami ostatních her, aby se nepřekrývaly
.duel-invite.tetris-invite {
bottom: 120px;
}
.tetris-game-modal {
.tetris-layout {
display: flex;
flex-wrap: wrap;
gap: 24px;
justify-content: center;
align-items: flex-start;
}
.tetris-own {
display: flex;
gap: 16px;
}
.tetris-board-wrap {
position: relative;
}
.tetris-board {
display: block;
border-radius: 6px;
}
.tetris-overlay {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 5rem;
font-weight: 700;
color: #fff;
text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
background: rgba(0, 0, 0, 0.25);
pointer-events: none;
&.small {
font-size: 2.2rem;
}
}
.tetris-flash {
position: absolute;
top: 8px;
left: 0;
right: 0;
text-align: center;
font-weight: 700;
color: #fca5a5;
text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
pointer-events: none;
}
.tetris-side {
min-width: 110px;
}
.tetris-label {
font-size: 0.8rem;
text-transform: uppercase;
opacity: 0.6;
margin-top: 10px;
}
.tetris-value {
font-size: 1.4rem;
font-weight: 700;
}
.tetris-help {
margin-top: 16px;
font-size: 0.8rem;
opacity: 0.7;
line-height: 1.5;
}
.tetris-opponents {
display: flex;
flex-wrap: wrap;
gap: 12px;
max-width: 440px;
}
.tetris-mini {
text-align: center;
canvas {
display: block;
border-radius: 4px;
}
&.dead canvas {
opacity: 0.35;
}
}
.tetris-mini-name {
font-size: 0.8rem;
font-weight: 600;
max-width: 90px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tetris-mini-score {
font-size: 0.75rem;
opacity: 0.7;
}
.tetris-players {
columns: 2;
}
}