xonecas.io
6119
My

mysis / files

mysis / internal / constants / constants.go

980 bytes
1// Package constants provides application-wide constants.
2package constants
3
4import "time"
5
6const (
7	// AppName is the application name.
8	AppName = "mysis"
9
10	// AppDataDir is the directory name for application data.
11	AppDataDir = ".config/mysis"
12)
13
14// Timing constants
15const (
16	// DefaultTimeout is the default timeout for operations.
17	DefaultTimeout = 30 * time.Second
18
19	// GameTickDuration is the SpaceMolt game server tick duration.
20	GameTickDuration = 10 * time.Second
21
22	// AvgToolCallsPerTurn is the expected average tool calls per turn for autoplay timing.
23	// Database analysis shows actual average is ~3, but we use 10 for safety margin.
24	AvgToolCallsPerTurn = 10
25)
26
27var (
28	// AutoplayInterval is the interval between autoplay turns.
29	// Calculated as: AvgToolCallsPerTurn × GameTickDuration × 0.75
30	// Per DESIGN.md: "game tick time * max tool calls * .75"
31	AutoplayInterval = time.Duration(float64(AvgToolCallsPerTurn)*GameTickDuration.Seconds()*0.75) * time.Second
32)