{
 "原理:為什麼規則引擎要和畫面分開#2": {
  "type": "cards",
  "title": "廚房與外場",
  "cards": [
   {
    "title": "廚房",
    "points": [
     "規則引擎",
     "煮幾分鐘",
     "湯有沒有滾",
     "配料齊不齊"
    ]
   },
   {
    "title": "外場",
    "points": [
     "遊戲層",
     "Flame 畫面",
     "HUD",
     "音效"
    ]
   }
  ],
  "reveal": [
   0,
   1,
   2,
   2
  ]
 },
 "原理:為什麼規則引擎要和畫面分開#3": {
  "type": "flow",
  "avatar": "hide",
  "layout": "snake",
  "title": "一顆球的旅行",
  "nodes": [
   {
    "label": "玩家操作",
    "sub": "或電腦對手"
   },
   {
    "label": "物理判定",
    "sub": "遊戲層"
   },
   {
    "label": "規則引擎",
    "sub": "更新狀態"
   },
   {
    "label": "事件清單",
    "sub": "依序"
   },
   {
    "label": "畫面演出",
    "sub": "遊戲層"
   }
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   5
  ]
 },
 "原理:為什麼規則引擎要和畫面分開#7": {
  "type": "cards",
  "title": "四個好處",
  "cards": [
   {
    "title": "好測試",
    "points": [
     "純 Dart",
     "dart test"
    ]
   },
   {
    "title": "好重播",
    "points": [
     "同輸入同輸出"
    ]
   },
   {
    "title": "好模擬",
    "points": [
     "一個迴圈打完一場"
    ]
   },
   {
    "title": "好換皮",
    "points": [
     "規則與畫面各自換"
    ]
   }
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ]
 },
 "觀念教學:事件,引擎只說「發生了什麼」#2": {
  "type": "cards",
  "title": "事件的三個特點",
  "cards": [
   {
    "title": "過去式",
    "points": [
     "球數變了",
     "打席結束了",
     "跑者移動了",
     "得分了"
    ]
   },
   {
    "title": "只帶事實",
    "points": [
     "得 2 分",
     "不帶文字"
    ]
   },
   {
    "title": "有順序",
    "points": [
     "一個動作多個事件",
     "順序就是故事"
    ]
   }
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   3
  ]
 },
 "觀念教學:事件,引擎只說「發生了什麼」#5": {
  "type": "table",
  "avatar": "hide",
  "title": "事件帶什麼資料",
  "head": [
   "事件",
   "帶的資料"
  ],
  "widths": [
   3,
   3
  ],
  "rows": [
   [
    "CountChanged",
    "balls, strikes"
   ],
   [
    "FoulBall",
    "strikes"
   ],
   [
    "AtBatEnded",
    "result"
   ],
   [
    "RunnerMoved",
    "from, to"
   ],
   [
    "RunScored",
    "runs"
   ],
   [
    "OutRecorded",
    "outs"
   ],
   [
    "HalfInningEnded",
    "runs"
   ]
  ],
  "reveal": [
   0,
   0,
   7
  ]
 },
 "觀念教學:好壞球、界外球與出局,一個打席的狀態機#2": {
  "type": "table",
  "avatar": "hide",
  "title": "12 種球數(壞-好)",
  "head": [
   "好球＼壞球",
   "0壞",
   "1壞",
   "2壞",
   "3壞"
  ],
  "widths": [
   2,
   1,
   1,
   1,
   1
  ],
  "rows": [
   [
    "0 好球",
    "0-0",
    "1-0",
    "2-0",
    "3-0"
   ],
   [
    "1 好球",
    "0-1",
    "1-1",
    "2-1",
    "3-1"
   ],
   [
    "2 好球",
    "0-2",
    "1-2",
    "2-2",
    "3-2"
   ]
  ],
  "reveal": [
   0,
   0,
   1,
   2,
   3,
   3
  ]
 },
 "觀念教學:好壞球、界外球與出局,一個打席的狀態機#4": {
  "type": "table",
  "title": "每一球的轉移規則",
  "head": [
   "球的結果",
   "球數變化"
  ],
  "widths": [
   2,
   4
  ],
  "rows": [
   [
    "壞球",
    "壞球 +1;達到 4 就保送"
   ],
   [
    "called 好球",
    "好球 +1;達到 3 就三振"
   ],
   [
    "揮空",
    "好球 +1;達到 3 就三振"
   ],
   [
    "界外球",
    "好球 +1,但已是 2 時不變"
   ],
   [
    "打進場內",
    "打席結束,看打擊結果"
   ]
  ],
  "reveal": [
   0,
   0,
   1,
   2,
   3,
   4,
   5
  ]
 },
 "觀念教學:好壞球、界外球與出局,一個打席的狀態機#5": {
  "type": "flow",
  "title": "界外球的規則",
  "layout": "row",
  "nodes": [
   {
    "label": "界外球"
   },
   {
    "label": "好球數小於 2?"
   },
   {
    "label": "好球加一"
   },
   {
    "label": "回報事件",
    "sub": "FoulBall"
   }
  ],
  "reveal": [
   0,
   2,
   3,
   4,
   4
  ]
 },
 "觀念教學:跑壘、得分與半局狀態機#1": {
  "type": "flow",
  "title": "壘包怎麼存",
  "layout": "row",
  "nodes": [
   {
    "label": "一壘",
    "sub": "bases[0]"
   },
   {
    "label": "二壘",
    "sub": "bases[1]"
   },
   {
    "label": "三壘",
    "sub": "bases[2]"
   }
  ],
  "reveal": [
   0,
   0,
   0,
   3,
   3
  ]
 },
 "觀念教學:跑壘、得分與半局狀態機#3": {
  "type": "table",
  "avatar": "hide",
  "title": "保送:強迫前進",
  "head": [
   "壘上情況",
   "結果"
  ],
  "widths": [
   3,
   4
  ],
  "rows": [
   [
    "一壘空",
    "打者上一壘"
   ],
   [
    "一壘有人、二壘空",
    "一壘跑者上二壘"
   ],
   [
    "一二壘有人、三壘空",
    "再往前推一格"
   ],
   [
    "滿壘",
    "三壘跑者回本壘得分"
   ],
   [
    "一壘、三壘有人",
    "一二三壘都有人"
   ]
  ],
  "reveal": [
   0,
   1,
   3,
   4,
   4,
   5
  ]
 },
 "觀念教學:跑壘、得分與半局狀態機#5": {
  "type": "bar",
  "title": "安打前進壘數",
  "labels": [
   "單安打",
   "二壘打",
   "三壘打",
   "全壘打"
  ],
  "values": [
   1,
   2,
   3,
   4
  ],
  "unit": "壘",
  "reveal": [
   0,
   4,
   4,
   4,
   4,
   4
  ]
 },
 "觀念教學:跑壘、得分與半局狀態機#6": {
  "type": "flow",
  "title": "安打函式三步",
  "layout": "row",
  "nodes": [
   {
    "label": "新建 next"
   },
   {
    "label": "三壘往回算"
   },
   {
    "label": "處理打者"
   },
   {
    "label": "整批替換"
   }
  ],
  "reveal": [
   0,
   2,
   3,
   4
  ]
 },
 "觀念教學:跑壘、得分與半局狀態機#7": {
  "type": "flow",
  "title": "場內出局與三出局",
  "layout": "snake",
  "nodes": [
   {
    "label": "出局數加一"
   },
   {
    "label": "回報事件",
    "sub": "OutRecorded"
   },
   {
    "label": "球數歸零"
   },
   {
    "label": "清空壘包",
    "sub": "三出局時"
   },
   {
    "label": "半局結束",
    "sub": "HalfInningEnded"
   }
  ],
  "reveal": [
   0,
   1,
   5,
   5
  ]
 },
 "課後重點整理:規則引擎與狀態機#7": {
  "type": "waterfall",
  "title": "案例二:半局得分(示範)",
  "unit": "分",
  "items": [
   {
    "label": "二壘打",
    "value": 1
   },
   {
    "label": "滿貫全壘打",
    "value": 4
   },
   {
    "label": "半局合計",
    "value": 5,
    "kind": "total"
   }
  ],
  "reveal": [
   0,
   0,
   0,
   3
  ]
 }
}