需求
“Draw a straight pool state diagram with open and ball-in-hand states for players A and B, transitions for called pockets, misses and fouls, and a final win when a player reaches 150 points.”
接著試試Change the winning score from 150 to 100.Add a separate break state before player A opens.
這張圖裡有什麼
看懂背後的決策。
01
Miss and foul transitions switch players
02
Ball-in-hand state following a foul
03
Pocketing the called ball continues the turn unless the winning score is reached
04
Winning condition triggers an accepting final state
Verifying game logic or teaching automata theory with a real-world example.