Structures
The following structures are available globally.
-
A simple immutable struct to capture a point with a label.
See moreDeclaration
Swift
public struct Dot
-
A DotPuzzle ADT represents a connect-the-dots puzzle that is in the middle of being solved. To that end, the abstract state of this ADT is two properties:
- conected: a list of dots that have already been connected, in the order that they were connected.
- unconnected: a list of dots that have yet to be connected, in the order that the should be connected.
Both sequences can be represented as arrays of Dots.
See moreDeclaration
Swift
public struct DotPuzzle
-
A structure to help us convert between two coordinate systems. Points in
Model Coordinates
are zoomed and shifted to produce points inView Coordinates
.The abstract state for a conversion is:
- zoomScale: the scale facter when going from model to view.
- viewOffset: where the original in model coordinates appears in view coordinates.
Abstraction Invariant: zoomScale > 0
See moreDeclaration
Swift
public struct ModelToViewCoordinates