2019-12-08 22:43:49 +01:00
|
|
|
from typing import Dict, Optional, Any
|
|
|
|
|
|
|
|
from bemani.backend.base import Base, Factory
|
|
|
|
from bemani.backend.bishi.bishi import TheStarBishiBashi
|
|
|
|
from bemani.common import Model
|
|
|
|
from bemani.data import Data
|
|
|
|
|
|
|
|
|
|
|
|
class BishiBashiFactory(Factory):
|
|
|
|
|
|
|
|
MANAGED_CLASSES = [
|
|
|
|
TheStarBishiBashi,
|
|
|
|
]
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def register_all(cls) -> None:
|
2021-08-19 21:20:31 +02:00
|
|
|
for gamecode in ['IBB']:
|
|
|
|
Base.register(gamecode, BishiBashiFactory)
|
2019-12-08 22:43:49 +01:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def create(cls, data: Data, config: Dict[str, Any], model: Model, parentmodel: Optional[Model]=None) -> Optional[Base]:
|
|
|
|
|
2021-08-19 21:20:31 +02:00
|
|
|
if model.gamecode == 'IBB':
|
2019-12-08 22:43:49 +01:00
|
|
|
return TheStarBishiBashi(data, config, model)
|
|
|
|
|
|
|
|
# Unknown game version
|
|
|
|
return None
|