Move Adjustment to different file

This commit is contained in:
Jeremy Saklad 2021-08-03 12:24:53 -05:00
parent 66deeb50e7
commit 92109d5141
Signed by: Jeremy Saklad
GPG Key ID: 9CA2149583EDBF84
2 changed files with 29 additions and 25 deletions

View File

@ -11,6 +11,7 @@ from os import cpu_count
from ortools.sat.python import cp_model
from data.adjustments import Adjustment
from data.appendages import Appendage
from data.costs import Cost
from data.skulls import Skull
@ -70,31 +71,6 @@ cp_model.CpModel.AddGeneralMultiplicationEquality = AddGeneralMultiplicationEqua
del AddGeneralMultiplicationEquality
class Adjustment(Enum):
"""An action that is taken after all parts have been added to a skeleton."""
CARVE_AWAY_AGE = Action(
"Carve away some evidence of age",
cost = Cost.ACTION.value,
antiquity = -2
)
DISGUISE_AMALGAMY = Action(
"Disguise the amalgamy of this piece",
cost = Cost.ACTION.value + 25*Cost.JADE_FRAGMENT.value,
amalgamy = -2
)
MAKE_LESS_DREADFUL = Action(
"Make your skeleton less dreadful",
cost = Cost.ACTION.value,
menace = -2
)
def __str__(self):
return str(self.value)
class Declaration(Enum):
"""An action that is taken after all adjustments have been made to a skeleton."""

28
data/adjustments.py Normal file
View File

@ -0,0 +1,28 @@
from enum import Enum
from data.costs import Cost
from objects.action import Action
class Adjustment(Enum):
"""An action that is taken after all parts have been added to a skeleton."""
CARVE_AWAY_AGE = Action(
"Carve away some evidence of age",
cost = Cost.ACTION.value,
antiquity = -2
)
DISGUISE_AMALGAMY = Action(
"Disguise the amalgamy of this piece",
cost = Cost.ACTION.value + 25*Cost.JADE_FRAGMENT.value,
amalgamy = -2
)
MAKE_LESS_DREADFUL = Action(
"Make your skeleton less dreadful",
cost = Cost.ACTION.value,
menace = -2
)
def __str__(self):
return str(self.value)