Projekt_AI-Automatyczny_saper/Engine/BombFactory.py
2021-03-30 21:01:54 +02:00

19 lines
579 B
Python

from Constants import DECOY, ATOMIC_BOMB, CHEMICAL_BOMB, CLAYMORE, LAND_MINE
from Engine.Bomb import Bomb
class BombFactory:
@staticmethod
def create(bombType):
if bombType == DECOY:
return Bomb(float('inf'), float('inf'), DECOY)
elif bombType == ATOMIC_BOMB:
return Bomb(2, 2, ATOMIC_BOMB)
elif bombType == CHEMICAL_BOMB:
return Bomb(2, 3, CHEMICAL_BOMB)
elif bombType == CLAYMORE:
return Bomb(2, 4, CLAYMORE)
elif bombType == LAND_MINE:
return Bomb(3, 4, LAND_MINE)