#if it is invalid then move to invalid state, and return correct state we found in that function
#print("constants")
#goal.set("add_constants")
defadd_constants(goal="add_constants"):
# use tree functionality to add constants, pass in expression with two constants to expression tree and solve
# generate new correct equation based on this result
# check if user input is the same as what we caluclated
# if it is correct then
user.get_input()
goal.set(user.state)
# if it is invalid then move to the invalid state
defmoved_variables(goal="move_variables"):
#user.moveVariables()
print("variables")
goal.set("add_variables")
goal.set("invalid_state "+tutorEq)
defadd_variables(goal="add_variables"):
print("add")
goal.set("end_process")
defincorrect_state(goal="invalid state"):
print("You have entered an invalid state. We anticipated the correct step to be: \n Please continue solving the problem with the corrected equation above.")
print("You have entered an invalid state. We anticipated the correct step to be: ",tutorEqn,"\nPlease continue solving the problem with the corrected equation.")
# need to print what correct state would have been
user.equation=tutorEqn
user.get_input()
goal.set(user.state)
...
...
@@ -223,8 +250,6 @@ class EmptyEnvironment(ccm.Model):