Feat: session table and interface

This commit is contained in:
Grail Finder
2025-07-02 16:29:52 +03:00
parent 3e0d24f5f8
commit 8d159baad7
6 changed files with 38 additions and 15 deletions

View File

@ -21,15 +21,12 @@ var (
func StartTurnTimer(roomID string, duration time.Duration) {
mu.Lock()
defer mu.Unlock()
if _, exists := timers[roomID]; exists {
return // Timer already running
}
ticker := time.NewTicker(1 * time.Second)
done := make(chan bool)
timers[roomID] = &roomTimer{ticker: ticker, done: done}
go func() {
for {
select {