Projekt_AI-Automatyczny_saper/Engine/BombFactory.py
2021-06-01 17:38:31 +02:00

19 lines
717 B
Python

from Constants import DECOY, ATOMIC_BOMB, CHEMICAL_BOMB, CLAYMORE, LAND_MINE, NONE, LONG, SHORT, IMMEDIATE, YES, NO, LARGE, SMALL, MEDIUM
from Engine.Bomb import Bomb
class BombFactory:
@staticmethod
def create(bombType):
if bombType == DECOY:
return Bomb(NONE, DECOY, LARGE, SMALL, NO)
elif bombType == ATOMIC_BOMB:
return Bomb(LONG, ATOMIC_BOMB, LARGE, LARGE, YES)
elif bombType == CHEMICAL_BOMB:
return Bomb(SHORT, CHEMICAL_BOMB, SMALL, SMALL, NO)
elif bombType == CLAYMORE:
return Bomb(NONE, CLAYMORE, SMALL, MEDIUM, YES)
elif bombType == LAND_MINE:
return Bomb(IMMEDIATE, LAND_MINE, LARGE, LARGE, NO)