The class hierachy for variables, terms, and term creators could stand to be improved. It's a little confusing, and lacks some symmetry.
Current implementation:
// model
Variable
ObjectVarable (has an artificial symbol, not shown in the UI)
Term
ConstantTerm
VariableTerm
ObjectTerm
TermCreator
ConstantTermCreator
ObjectTermCreator
VariableTermCreator
// view
TermNode
ConstantTermNode
ObjectTermNode
VariableTermNode
TermCreatorNode (overloaded to handle all TermCreator types)
VariableValuesNode (overloaded to handle both Variable and ObjectVariable)
VariableNode (overloaded to handle both Variable and ObjectVariable)
Instead, we should differentiate between "symbolic variables" (which have a symbol, like 'x') and "object variables" (which are represented by an image, like turtle.png).
So perhaps something like this:
// model
Variable
ObjectVariable
SymbolicVariable
Term
ConstantTerm
VariableTerm
ObjectTerm( variable: ObjectVariable )
SymbolicTerm( variable: SymbolicVariable )
TermCreator
ConstantTermCreator
ObjectTermCreator
SymbolicTermCreator
// view
TermNode
ConstantTermNode
ObjectTermNode
SymbolicTermNode
TermCreatorNode (overloaded to handle all TermCreator types)
VariableValuesNode (overloaded to handle both ObjectVariable and SymbolicVariable)
ObjectVariableNode( variable: ObjectVariable )
SymbolicVariableNode( variable: SymolicVariable )
This would be a big change, so I may ultimately punt. But it's worth investigating.
The class hierachy for variables, terms, and term creators could stand to be improved. It's a little confusing, and lacks some symmetry.
Current implementation:
Instead, we should differentiate between "symbolic variables" (which have a symbol, like 'x') and "object variables" (which are represented by an image, like turtle.png).
So perhaps something like this:
This would be a big change, so I may ultimately punt. But it's worth investigating.