// Sort Colors - Sorting with Safety Yellow
// Teaching type classification through play

program SortColors {

  // Create some items to sort
  items MyItems {
    apple: Red
    banana: Yellow
    blueberry: Blue
    strawberry: Red
    lemon: Yellow
  }

  // Create bins for sorting
  bins MyBins {
    RedBin accepts Red
    YellowBin accepts Yellow
    BlueBin accepts Blue
  }

  // Ask Yellow to help sort!
  Yellow do sort MyItems into MyBins

  // Check if everything is in the right place
  Yellow do check MyBins

  // Show the result
  show "All sorted!"
  show RedBin.count + " red items"
  show YellowBin.count + " yellow items"
  show BlueBin.count + " blue items"

}

// What the child sees (blocks):
// ┌─────────────────────┐
// │ 📦 Create Items     │
// │ ┌─────────────────┐ │
// │ │ 🍎 apple: Red   │ │
// │ │ 🍌 banana: Yel  │ │
// │ │ 🫐 berry: Blue  │ │
// │ │ 🍓 straw: Red   │ │
// │ │ 🍋 lemon: Yel   │ │
// │ └─────────────────┘ │
// └─────────────────────┘
// ┌─────────────────────┐
// │ 🗑️ Create Bins      │
// │ [Red] [Yellow] [Blu]│
// └─────────────────────┘
// ┌─────────────────────┐
// │ 🟡 Yellow do [Sort] │
// │ [Items] into [Bins] │
// └─────────────────────┘
// ┌─────────────────────┐
// │ 🟡 Yellow do [Check]│
// └─────────────────────┘

// Hidden learning: Type classification!
// Each item has a "type" (color)
// Bins only "accept" certain types
// This is exactly how type systems work!
