diff --git a/bonemarketsolver/objects/action.py b/bonemarketsolver/objects/action.py index 974eb0e..3f00ff7 100644 --- a/bonemarketsolver/objects/action.py +++ b/bonemarketsolver/objects/action.py @@ -47,6 +47,9 @@ class Action: # Skeleton: Fins fins: int = 0 + # Skeleton: Number of Segments + segments: int = 0 + # Skeleton: Tentacles tentacles: int = 0 diff --git a/bonemarketsolver/solve.py b/bonemarketsolver/solve.py index 27daaaa..568a19f 100644 --- a/bonemarketsolver/solve.py +++ b/bonemarketsolver/solve.py @@ -166,6 +166,10 @@ def Solve(shadowy_level, bone_market_fluctuations = None, zoological_mania = Non fins = model.NewIntVar('fins', lb = 0) model.Add(fins == cp_model.LinearExpr.WeightedSum(actions.values(), [action.value.fins for action in actions.keys()])) + # Segments calculation + segments = model.NewIntVar('segments', lb = 0) + model.Add(segments == cp_model.LinearExpr.WeightedSum(actions.values(), [action.value.segments for action in actions.keys()])) + # Tentacles calculation tentacles = model.NewIntVar('tentacles', lb = 0) model.Add(tentacles == cp_model.LinearExpr.WeightedSum(actions.values(), [action.value.tentacles for action in actions.keys()]))