@startuml
title How is a turn of Demesne played?

start

partition Action Phase {
  :Begin Action Phase;

  repeat
    :Play Action Card;
  repeat while () is ([Willing and able])

  :End Action Phase;
}

partition Buy Phase {
  :Begin Buy Phase;

  repeat
    :Play Treasure Card;
  repeat while () is ([Willing and able])

  repeat
    :Buy Card;
  repeat while () is ([Willing and able])

  :End Buy Phase;
}

partition Clean Up Phase {
  :Begin Clean Up Phase;

  :Discard all Cards in hand or in play;

  :Draw five Cards to hand;

  :End Clean Up Phase;
}

stop

@enduml
