Class ArithmeticEngine
java.lang.Object
at.petrak.hexcasting.api.casting.arithmetic.engine.ArithmeticEngine
This is the class responsible for managing the various Arithmetics that are in use, deciding based on the current
stack which Operator should be called, etc.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionIterable<at.petrak.hexcasting.api.casting.math.HexPattern>at.petrak.hexcasting.api.casting.eval.OperationResultrun(at.petrak.hexcasting.api.casting.math.HexPattern pattern, CastingEnvironment env, at.petrak.hexcasting.api.casting.eval.vm.CastingImage image, at.petrak.hexcasting.api.casting.eval.vm.SpellContinuation continuation) Runs one of the contained Operators assigned to the given pattern, modifying the passed stack of iotas.
-
Field Details
-
arithmetics
-
-
Constructor Details
-
ArithmeticEngine
-
-
Method Details
-
operatorSyms
-
run
public at.petrak.hexcasting.api.casting.eval.OperationResult run(at.petrak.hexcasting.api.casting.math.HexPattern pattern, CastingEnvironment env, at.petrak.hexcasting.api.casting.eval.vm.CastingImage image, at.petrak.hexcasting.api.casting.eval.vm.SpellContinuation continuation) throws at.petrak.hexcasting.api.casting.mishaps.Mishap Runs one of the contained Operators assigned to the given pattern, modifying the passed stack of iotas.- Parameters:
pattern- The pattern that was drawn, used to determine which operators are candidates.env- The casting environment.image- The casting image.continuation- The current continuation.- Returns:
- The iotas to be added to the stack.
- Throws:
at.petrak.hexcasting.api.casting.mishaps.Mishap- mishaps if invalid input to the operators is given by the caster.
-