Skip to content

formalize states of Knit operation #166

@t0mpr1c3

Description

@t0mpr1c3

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions