41 lines
1.2 KiB
Text
41 lines
1.2 KiB
Text
---
|
|
config:
|
|
theme: forest
|
|
---
|
|
stateDiagram
|
|
[*] --> GameSetup
|
|
GameSetup --> WhiteTurn
|
|
state ChessGame {
|
|
WhiteTurn --> HandSetup
|
|
BlackTurn --> HandSetup
|
|
|
|
HandSetup --> DrawPhase
|
|
DrawPhase --> ResolvePersistentEffects : Draw/Discard
|
|
|
|
ResolvePersistentEffects --> PreMovePhase : Update Durations
|
|
|
|
PreMovePhase --> AttachCards : Play Cards
|
|
AttachCards --> ApplyCardEffects
|
|
ApplyCardEffects --> Movement
|
|
|
|
Movement --> PostMovePhase
|
|
PostMovePhase --> ApplyTileEffects : Resolve Move Effects
|
|
ApplyTileEffects --> EvaluatePosition
|
|
|
|
state EvaluatePosition {
|
|
[*] --> CheckStatus
|
|
CheckStatus --> Checkmate : In Checkmate
|
|
CheckStatus --> Draw : In Draw
|
|
CheckStatus --> ValidMove : Game Continues
|
|
ValidMove --> SpecialMoves : En Passant/Castle/Promote
|
|
SpecialMoves --> [*]
|
|
}
|
|
|
|
EvaluatePosition --> CleanupPhase
|
|
CleanupPhase --> WhiteTurn : White's Turn
|
|
CleanupPhase --> BlackTurn : Black's Turn
|
|
CleanupPhase --> RoundEnd : Game Over
|
|
}
|
|
RoundEnd --> ShopPhase
|
|
ShopPhase --> GameSetup : Next Round
|
|
RoundEnd --> [*] : End Game
|