-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
Description
At the moment, the Knit
operation is governed by multiple state variables that control program flow in procedures such as knit()
. These variables include the following members of class OpKnit
:
bool m_lineRequested;
bool m_lastLineFlag;
bool m_firstRun;
bool m_workedOnLine;
plus (m_sOldPosition == position)
and so on.
The imperative code works fine but if we want to pursue a more OO programming style it is possible to abstract some or all of these into a sequence of operations governed by the finite state machine.
My suggestion is to leave things as they are for now, but think about making changes if we want to do #105 which will add further complexity to the program flow.