How zerovolts/tapestry works
Pattern System (Top Layer)
• Sub-components for each pattern type:
• Circle
• Cluster
• Line
• Neighborhood
• Rectangle
Iterator Systems (Right Side)
• Create two main iterator components:
• Flood Iterator
• Selection Iterator
• Predicate input flow into the Flood Iterator
Coordinate System (Left Side)
• A "Coordinate System" component
• Relationship to both the VecGrid and Patterns
Implementation Details
• Blue: Core components (VecGrid)
• Green: Patterns
• Yellow: Iterators
• Gray: Utility components (Coordinate System)
Data Flow Representation
• Arrowheads to show direction of data flow
Component Relationships
• [Coordinate System] ←→ [VecGrid<T>] ←→ [Iterators]
• ↑ ↑ ↑
• [Pattern System]──────────┘
Additional Elements
• Example usage flows for common operations
• Integration points with external systems
Key Considerations:
Pattern Integration
• Demonstrate how patterns feed into both the grid and iterators
• Extensibility of the pattern system
Iterator Flow
• How the flood and selection iterators interact with the grid
• Predicate input points
Documentation Notes
• Notes about generic type constraints
• Common use-case flows
• Reference the example applications (life, dungeon, ring, circle)
• The central role of VecGrid<T>
• The composability of patterns with iterators
• The flexibility of the coordinate system
• The clear separation of concerns between components
Remember to include a small example flow showing how a typical operation (like flood fill) would traverse the system, from coordinate input through pattern application to final iteration output.
This design should help developers understand both the high-level architecture and the practical usage patterns of the library.