func (cfg Config) validate(log log.Logger, socketRunner SocketRunner, gameRunner GameRunner) error {
	switch {
	case log == nil:
		return fmt.Errorf("log required")
	case socketRunner == nil:
		return fmt.Errorf("socket runner required")
	case gameRunner == nil:
		return fmt.Errorf("game runner required")
	}
	return nil
}
// validate ensures the configuration has no errors.
validate ensures the configuration has no errors.
// validate ensures the configuration has no errors .
func (cfg Config) validate(log log.Logger, socketRunner SocketRunner, gameRunner GameRunner) error {
	switch {
	case log == nil:
		return fmt.Errorf("log required")
	case socketRunner == nil:
		return fmt.Errorf("socket runner required")
	case gameRunner == nil:
		return fmt.Errorf("game runner required")
	}
	return nil
}
func ( cfg Config ) validate ( log log . Logger , socketRunner SocketRunner , gameRunner GameRunner ) error { switch { case log == nil : return fmt . Errorf ( " " ) case socketRunner == nil : return fmt . Errorf ( " " ) case gameRunner == nil : return fmt . Errorf ( " " ) } return nil }
validate ensures the configuration has no errors.
validate ensures the configuration has no errors .