by deckar01 · 7y ago · 0 comments
interactor_p->interact(thingy_p)
Would this still be considered the visitor pattern or is the extra layer of indirection important? "Square class"
drawOn: aCanvas
aCanvas line: (some point) to: (some point).
"etc"
"Triangle class"
drawOn: aCanvas
aCanvas line: self leftVertex to: self rightVertex.
"etc"
"Canvas class"
drawShapes: aCollection
aCollection do: [ :shape |
shape drawOn: self ]