How raphaeltarita/skullgame-common works
Main Components
a) Core Library Components:
• Common Module (Central component)
• Authentication System
• Game State Management
• Move System
• Condition System
b) Platform Targets (as supported implementations):
• JVM Target
• JS Target (Browser & NodeJS)
• WASM Target (Browser & NodeJS)
• Native Targets (Various platforms)
┌─ Platform Targets Layer ─────────────────────────┐
• [JVM] [JS] [WASM] [Native Implementations] │
• ┬───────────────────────────────┘
┌─ Core Library Layer ──────────────────────────────┐
• ┌─ Game Logic ─────────────────────────────────┐ │
• Moves System │ │
• State Management │ │
• ┘ │
• ┌─ Common Infrastructure ───────────────────────┐ │
• Authentication │ │
• Conditions System │ │
• ┘ │
• ┘
Specific Component Details
a) Authentication Components:
• LoginCredentials
• TokenHolder
b) Game State Components:
• GameState
• PlayerGame
• PlayerInfo
• Card
• TurnMode
c) Moves System:
• Various move types (Bid, Lay, Guess, etc.)
• Move outcomes
• Round management
d) Condition System:
• Boolean conditions
• Signal conditions
• Rendezvous conditions
• Conflated conditions
Important Relationships
• How the common code is shared across all platform targets
• Relationship between game state and moves
• Condition system's interaction with game state management
• Authentication flow integration
Implementation Notes
• The library's role as a shared component between server and clients
• Platform-agnostic nature of the core components
• Clear separation between game logic and infrastructure components
• Extensibility points for different platforms