2021-09-07 19:56:15 +02:00
|
|
|
from typing import List, Optional, Type
|
2019-12-08 22:43:49 +01:00
|
|
|
|
|
|
|
from bemani.backend.base import Base, Factory
|
|
|
|
from bemani.backend.bishi.bishi import TheStarBishiBashi
|
|
|
|
from bemani.common import Model
|
2021-08-20 06:43:59 +02:00
|
|
|
from bemani.data import Config, Data
|
2019-12-08 22:43:49 +01:00
|
|
|
|
|
|
|
|
|
|
|
class BishiBashiFactory(Factory):
|
2021-09-07 19:56:15 +02:00
|
|
|
MANAGED_CLASSES: List[Type[Base]] = [
|
2019-12-08 22:43:49 +01:00
|
|
|
TheStarBishiBashi,
|
|
|
|
]
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def register_all(cls) -> None:
|
2022-10-15 20:56:30 +02:00
|
|
|
for gamecode in ["IBB"]:
|
2021-08-19 21:20:31 +02:00
|
|
|
Base.register(gamecode, BishiBashiFactory)
|
2019-12-08 22:43:49 +01:00
|
|
|
|
|
|
|
@classmethod
|
2022-10-15 20:56:30 +02:00
|
|
|
def create(
|
|
|
|
cls,
|
|
|
|
data: Data,
|
|
|
|
config: Config,
|
|
|
|
model: Model,
|
|
|
|
parentmodel: Optional[Model] = None,
|
|
|
|
) -> Optional[Base]:
|
|
|
|
if model.gamecode == "IBB":
|
2019-12-08 22:43:49 +01:00
|
|
|
return TheStarBishiBashi(data, config, model)
|
|
|
|
|
|
|
|
# Unknown game version
|
|
|
|
return None
|