feat: add configurable speed and expanded grid presets for snake
- Add per-game speed setting with presets (Slow/Normal/Fast/Insane) - Add speed selector UI in snake lobby - Expand grid presets with Tiny (15x15) and XL (50x30) - Auto-calculate cell size based on grid dimensions - Preserve speed setting in rematch games
This commit is contained in:
@@ -21,6 +21,8 @@ type LobbyProps struct {
|
||||
SnakeSoloClicks []h.H
|
||||
SnakeMultiClicks []h.H
|
||||
ActiveSnakeGames []*snake.SnakeGame
|
||||
SelectedSpeedIndex int
|
||||
SpeedSelectClicks []h.H
|
||||
}
|
||||
|
||||
func LobbyView(p LobbyProps) h.H {
|
||||
@@ -41,7 +43,7 @@ func LobbyView(p LobbyProps) h.H {
|
||||
|
||||
var tabContent h.H
|
||||
if p.ActiveTab == "snake" {
|
||||
tabContent = SnakeLobbyTab(p.SnakeNicknameBind, p.SnakeSoloClicks, p.SnakeMultiClicks, p.ActiveSnakeGames)
|
||||
tabContent = SnakeLobbyTab(p.SnakeNicknameBind, p.SnakeSoloClicks, p.SnakeMultiClicks, p.ActiveSnakeGames, p.SelectedSpeedIndex, p.SpeedSelectClicks)
|
||||
} else {
|
||||
tabContent = connect4LobbyContent(p)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user