{
  "id": "count",
  "description": "Transfer cards one at a time between the hands, showing each card individually",
  "labels": {
    "en": "Count",
    "es": "Contar",
    "fr": "Compter",
    "de": "Zählen"
  },
  "family_ref": "true-counts",
  "action_contract": {
    "requires": [
      "source",
      "target"
    ],
    "parameters": {
      "count": {
        "required": false,
        "description": "Number of cards transferred, one at a time",
        "domain": "integer >= 1 | all",
        "default": "all"
      },
      "stacking": {
        "required": false,
        "description": "Whether the transferred packet lands onto or under the receiving hand's cards",
        "domain": [
          "onto",
          "under"
        ],
        "default": "onto"
      },
      "side": {
        "required": false,
        "description": "Which side was shown as each card passed",
        "domain": [
          "face",
          "back",
          "visible"
        ],
        "default": "visible"
      }
    },
    "post_state_invariant": "Cards transfer one at a time from source to target in the order stacking specifies (reversed for onto, kept for under), and every card is individually shown to observers, side, during the transfer.",
    "post_state": {
      "state_schema_ref": "https://tamaraspec.org/schema/tcs-playing-cards-state-0.1.json",
      "effects": [
        {
          "op": "show",
          "subject": "source",
          "select": {
            "position": "top",
            "count": {
              "param": "count"
            }
          },
          "side": {
            "param": "side"
          },
          "mode": "individual"
        },
        {
          "op": "move",
          "select": {
            "position": "top",
            "count": {
              "param": "count"
            }
          },
          "from": "source",
          "to": "target",
          "arrival": "singly",
          "at": {
            "param": "stacking"
          }
        }
      ]
    }
  }
}