How ofirpicazo/solitario works
Main Components Organization
a) Presentation Layer
• This at the top level
• Static assets (HTML, fonts, images)
• SASS/CSS compilation pipeline
b) Game Core Layer
• This in the middle
• Main game logic components
• Event system (pubsub)
c) Storage Layer
• This at the bottom
• Game state persistence mechanism
Component Relationships
a) Game Components (Core Layer):
• It to subsidiary components:
• Stock (deck)
• Waste
• Foundation
• Tableau
• CardGroup
• Card
b) Storage System:
• Relationships with serializable game elements:
• GameForStorage
• CardForStorage
• PileForStorage
c) Asset Pipeline:
• SASS compilation flow
• Static asset serving
Specific Implementation Details
• Blue rectangles for core game components
• Green rectangles for storage-related components
• Yellow rectangles for UI/presentation components
• Purple diamonds for utility modules
• Gray rectangles for static assets
• Event flow through the pubsub system
• Game state updates
• Storage operations
• Asset serving paths
Component Grouping
• Game Logic Group (game/*.js files)
• Storage Group (storage/*.js files)
• Asset Group (static/*)
• Style Group (sass/*)
The component hierarchy in the game logic
Key Technical Elements to Include:
• Compass for SASS compilation
• HTML5 technologies used
• Browser storage mechanisms
• Event system architecture
• Grouping boundaries
Level of Detail:
• Major components (Game, Card, Pile, etc.)
• Event system architecture
• Storage interaction patterns
• Exclude internal implementation details of individual components
Remember to add notes about:
• Build process (Rake tasks)
• Development dependencies (Java JRE, Compass)
• Asset compilation flow
This will give other developers a complete picture of both the runtime architecture and the development/build process.