WIP: Add multiplayer Snake game
N-player (2-8) real-time Snake game alongside Connect 4. Lobby has tabs to switch between games. Players join via invite link with 10-second countdown. Game loop runs at tick-based intervals with NATS pub/sub for state sync. Keyboard input not yet working (Datastar keydown binding issue still under investigation).
This commit is contained in:
@@ -61,3 +61,27 @@
|
||||
.player-chip { width: 20px; height: 20px; border-radius: 50%; background: #666; }
|
||||
.player-chip.red { background: #dc2626; }
|
||||
.player-chip.yellow { background: #facc15; }
|
||||
|
||||
/* Snake game */
|
||||
.snake-board {
|
||||
display: inline-grid;
|
||||
gap: 0;
|
||||
background: #1a1a2e;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
border: 3px solid #333;
|
||||
}
|
||||
.snake-row { display: contents; }
|
||||
.snake-cell {
|
||||
background: #16213e;
|
||||
border: 1px solid rgba(255,255,255,0.03);
|
||||
transition: background 0.05s;
|
||||
}
|
||||
.snake-cell.snake-food {
|
||||
background: #ff6b6b;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 6px rgba(255,107,107,0.6);
|
||||
}
|
||||
.snake-cell.snake-head { border-radius: 4px; }
|
||||
.snake-cell.snake-dead { opacity: 0.35; }
|
||||
.snake-wrapper:focus { outline: none; }
|
||||
|
||||
Reference in New Issue
Block a user