{
  "name": "hormiga_langton",
  "savedAt": "2026-07-26T07:06:19.081008",
  "blocks": [
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "filas",
        "50"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "columnas",
        "50"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "tamCelda",
        "320 / filas"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "blanco",
        "(255, 255, 255)"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "negro",
        "(0, 0, 0)"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = Patches({1}, {2})",
        "category": "tortuga",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "mundo",
        "filas",
        "columnas"
      ],
      "children": []
    },
    {
      "def": {
        "template": "for {0} in range({1}):",
        "category": "control",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": true,
        "isReporter": false
      },
      "values": [
        "i",
        "filas"
      ],
      "children": [
        {
          "def": {
            "template": "for {0} in range({1}):",
            "category": "control",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": true,
            "isReporter": false
          },
          "values": [
            "j",
            "columnas"
          ],
          "children": [
            {
              "def": {
                "template": "{0}[{1}][{2}] = {3}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  },
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "mundo",
                "i",
                "j",
                "blanco"
              ],
              "children": []
            }
          ]
        }
      ]
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "dirFila",
        "[1, 0, -1, 0]"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "dirCol",
        "[0, 1, 0, -1]"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "dirAngulo",
        "[0, 90, 180, 270]"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "fila",
        "filas // 2"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "col",
        "columnas // 2"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "direccion",
        "0"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = Turtle()",
        "category": "tortuga",
        "slots": [
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "hormiga"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0}.shape({1})",
        "category": "tortuga",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "hormiga",
        "\"ant\""
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0}.penup()",
        "category": "tortuga",
        "slots": [
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "hormiga"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0}.goto({1}, {2})",
        "category": "tortuga",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "hormiga",
        "col * tamCelda - 160 + tamCelda / 2",
        "fila * tamCelda - 160 + tamCelda / 2"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0}.setheading({1})",
        "category": "tortuga",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "hormiga",
        "dirAngulo[direccion]"
      ],
      "children": []
    },
    {
      "def": {
        "template": "while {0}:",
        "category": "control",
        "slots": [
          {
            "options": []
          }
        ],
        "isContainer": true,
        "isReporter": false
      },
      "values": [
        "True"
      ],
      "children": [
        {
          "def": {
            "template": "if {0}:",
            "category": "control",
            "slots": [
              {
                "options": []
              }
            ],
            "isContainer": true,
            "isReporter": false
          },
          "values": [
            "mundo[fila][col] == blanco"
          ],
          "children": [
            {
              "def": {
                "template": "{0}[{1}][{2}] = {3}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  },
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "mundo",
                "fila",
                "col",
                "negro"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0} = {1}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "direccion",
                "(direccion + 1) % 4"
              ],
              "children": []
            }
          ]
        },
        {
          "def": {
            "template": "else:",
            "category": "control",
            "slots": [],
            "isContainer": true,
            "isReporter": false
          },
          "values": [],
          "children": [
            {
              "def": {
                "template": "{0}[{1}][{2}] = {3}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  },
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "mundo",
                "fila",
                "col",
                "blanco"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0} = {1}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "direccion",
                "(direccion - 1) % 4"
              ],
              "children": []
            }
          ]
        },
        {
          "def": {
            "template": "{0} = {1}",
            "category": "variables",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "fila",
            "(fila + dirFila[direccion]) % filas"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0} = {1}",
            "category": "variables",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "col",
            "(col + dirCol[direccion]) % columnas"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.goto({1}, {2})",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "hormiga",
            "col * tamCelda - 160 + tamCelda / 2",
            "fila * tamCelda - 160 + tamCelda / 2"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.setheading({1})",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "hormiga",
            "dirAngulo[direccion]"
          ],
          "children": []
        },
        {
          "def": {
            "template": "wait({0})",
            "category": "variables",
            "slots": [
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "turtle_speed()"
          ],
          "children": []
        }
      ]
    }
  ]
}
