Files
cards/src/game/master.go
2021-03-13 16:02:30 -06:00

28 lines
501 B
Go

package game
import (
"local/sandbox/cards/src/config"
"local/sandbox/cards/src/storage"
"testing"
)
type Master struct {
config config.Config
storage Storage
locks *storage.RWLockMap
}
func NewMaster(config config.Config, s Storage) *Master {
return &Master{
config: config,
storage: s,
locks: storage.NewRWLockMap(),
}
}
func NewTestMaster(t *testing.T) *Master {
config := config.NewTestConfig(t)
storage := storage.NewStorage(config)
return NewMaster(config, storage)
}