123456789101112131415161718192021222324 |
- class_name Pouvoir
- enum Type {
- AUCUN,
- VIE,
-
- BONJOUR
- }
- static func fabriquer(type: Type):
- match type:
- Type.BONJOUR:
- return BonjourPouvoir.new()
- Type.VIE:
- return VieBonus.new()
-
-
- Type.AUCUN:
- return null
- _:
- assert(false, "Le nouveau pouvoir doit etre associe a son type " + str(type))
- return null
|