{
  "id": "down-under-deal",
  "description": "Alternately deal a card aside and move the next card under",
  "labels": {
    "en": "Down Under Deal",
    "es": "Reparto Abajo-Arriba",
    "fr": "Donne Dessus-Dessous",
    "de": "Down-Under-Geben"
  },
  "family_ref": "true-deals",
  "aliases": [
    "under-down deal"
  ],
  "action_contract": {
    "requires": [
      "source",
      "target"
    ],
    "parameters": {
      "start": {
        "required": false,
        "description": "Whether the first card goes to the display pile (down) or under the source (under)",
        "domain": [
          "down",
          "under"
        ],
        "default": "down"
      },
      "remaining": {
        "required": false,
        "description": "How many cards stop the cycle, once source is reduced to this size",
        "domain": "integer >= 0",
        "default": 1
      }
    },
    "post_state_invariant": "source's cards alternate: one moves to target (down) or to the bottom of source (under), starting with start, switching kind every step, and repeating until source's size reaches remaining; each moved card's own identity, mark, crimp and jog are unchanged. The end state is two piles.",
    "post_state": {
      "state_schema_ref": "https://tamaraspec.org/schema/tcs-playing-cards-state-0.1.json",
      "effects": [
        {
          "op": "cycle",
          "subject": "source",
          "to": "target",
          "start": {
            "param": "start"
          },
          "stop": {
            "remaining": {
              "param": "remaining"
            }
          },
          "alternate": true
        }
      ]
    }
  }
}