Open call-me-q opened 11 hours ago
flowchart TD
A[Start] --> B{Is quest template provided?}
B -->|Yes| C[Create Quest from Template]
B -->|No| D[Create New Quest]
C --> E{Is category valid?}
D --> E
E -->|No| F[Return Error - Invalid Category]
E -->|Yes| G{Are participants valid?}
G -->|No| F
G -->|Yes| H{Is quest time valid?}
H -->|No| F
H -->|Yes| I{Is quest eligible for submission?}
I -->|No| F
I -->|Yes| J[Generate Rewards]
J --> K[Return Quest ID and Status]
K --> L[Quest Active - Player Starts Quest]
L --> M{Is progress submitted?}
M -->|No| N[Wait for Player Progress]
M -->|Yes| O[Validate Progress]
O --> P{Is progress valid?}
P -->|No| Q[Return Error - Invalid Progress]
P -->|Yes| R[Update Progress]
R --> S{Is quest completed?}
S -->|No| T[Continue Quest]
S -->|Yes| U[Complete Quest]
U --> V[Generate Final Rewards]
V --> W[Return Completion Status and Rewards]
W --> X[End]
classDef startEnd fill:#333,stroke:#333,stroke-width:2px;
class A,X startEnd;
and this is from user POV
flowchart TD
A[Start] --> B[Browse Available Quests]
B --> C{Is there an active quest?}
C -->|Yes| D[View Active Quest Details]
C -->|No| E[Select Quest]
E --> F[Start Quest]
F --> G[Quest Started - Quest Active]
G --> H{Is progress ready to submit?}
H -->|No| I[Wait for Progress]
H -->|Yes| J[Submit Progress]
J --> K[Quest Service Validates Progress]
K --> L{Is progress valid?}
L -->|No| M[Return Error - Invalid Progress]
L -->|Yes| N[Update Progress]
N --> O{Is quest completed?}
O -->|No| P[Continue Quest]
O -->|Yes| Q[Complete Quest]
Q --> R[Receive Final Reward]
R --> S[View Quest Log]
S --> T[End]
classDef startEnd fill:#333,stroke:#333,stroke-width:2px;
class A,T startEnd;
This approach is a bit unusual. However it is better than we directly code the modules.
Plus it's a better way to plan things out.