PK10Algorithm::class, 'dice' => DiceAlgorithm::class, 'xocdia' => XocDiaAlgorithm::class, ]; public static function getAlgorithm(string $gameType): string { $class = self::$map[$gameType] ?? null; if (!$class) throw new \RuntimeException("Unknown game type: {$gameType}"); return $class; } public static function register(string $gameType, string $class): void { self::$map[$gameType] = $class; } }