feat: add single player snake mode
Add solo mode where players survive as long as possible while tracking score (food eaten). Single player games start with a shorter 3-second countdown vs 10 seconds for multiplayer, maintain exactly 1 food item for classic snake feel, and end when the player dies rather than when one player remains. - Add GameMode type (ModeMultiplayer/ModeSinglePlayer) and Score field - Filter single player games from "Join a Game" lobby list - Show "Ready?" and "Score: X" UI for single player mode - Hide invite link for single player games - Preserve game mode on rematch
This commit is contained in:
7
db/migrations/004_add_snake_mode.sql
Normal file
7
db/migrations/004_add_snake_mode.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- +goose Up
|
||||
ALTER TABLE games ADD COLUMN game_mode INTEGER NOT NULL DEFAULT 0;
|
||||
ALTER TABLE games ADD COLUMN score INTEGER NOT NULL DEFAULT 0;
|
||||
|
||||
-- +goose Down
|
||||
ALTER TABLE games DROP COLUMN score;
|
||||
ALTER TABLE games DROP COLUMN game_mode;
|
||||
Reference in New Issue
Block a user