{
  "name": "crecimiento_cristalino",
  "savedAt": "2026-07-14T23:55:44.318884",
  "blocks": [
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "n",
        "21"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "espacio",
        "(320 / n)"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "centro",
        "int(n / 2)"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "cristal",
        "(0, 230, 230)"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "fondo",
        "(10, 10, 30)"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "mundo",
        "Patches(n, n)"
      ],
      "children": []
    },
    {
      "def": {
        "template": "for {0} in range({1}):",
        "category": "control",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": true,
        "isReporter": false
      },
      "values": [
        "i",
        "n"
      ],
      "children": [
        {
          "def": {
            "template": "for {0} in range({1}):",
            "category": "control",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": true,
            "isReporter": false
          },
          "values": [
            "j",
            "n"
          ],
          "children": [
            {
              "def": {
                "template": "{0}[{1}][{2}] = {3}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  },
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "mundo",
                "i",
                "j",
                "fondo"
              ],
              "children": []
            }
          ]
        }
      ]
    },
    {
      "def": {
        "template": "{0}[{1}][{2}] = {3}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          },
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "mundo",
        "centro",
        "centro",
        "cristal"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "radio",
        "1"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "numCaminantes",
        "12"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "caminantes",
        "[]"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "filas",
        "[]"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "columnas",
        "[]"
      ],
      "children": []
    },
    {
      "def": {
        "template": "for {0} in range({1}):",
        "category": "control",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": true,
        "isReporter": false
      },
      "values": [
        "k",
        "numCaminantes"
      ],
      "children": [
        {
          "def": {
            "template": "{0} = Turtle()",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "caminante"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.shape({1})",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "caminante",
            "\"point\""
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.color({1})",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "caminante",
            "\"yellow\""
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.append({1})",
            "category": "variables",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "caminantes",
            "caminante"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0} = {1}",
            "category": "variables",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "angulo0",
            "random() * 2 * pi"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.append({1})",
            "category": "variables",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "filas",
            "(centro + int((radio + 3) * sin(angulo0))) % n"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.append({1})",
            "category": "variables",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "columnas",
            "(centro + int((radio + 3) * cos(angulo0))) % n"
          ],
          "children": []
        }
      ]
    },
    {
      "def": {
        "template": "while {0}:",
        "category": "control",
        "slots": [
          {
            "options": []
          }
        ],
        "isContainer": true,
        "isReporter": false
      },
      "values": [
        "True"
      ],
      "children": [
        {
          "def": {
            "template": "for {0} in range({1}):",
            "category": "control",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": true,
            "isReporter": false
          },
          "values": [
            "k",
            "numCaminantes"
          ],
          "children": [
            {
              "def": {
                "template": "{0} = {1}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "fila",
                "filas[k]"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0} = {1}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "col",
                "columnas[k]"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0} = {1}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "vecinos",
                "mundo.neighbors(fila, col)"
              ],
              "children": []
            },
            {
              "def": {
                "template": "if {0}:",
                "category": "control",
                "slots": [
                  {
                    "options": []
                  }
                ],
                "isContainer": true,
                "isReporter": false
              },
              "values": [
                "cristal in vecinos"
              ],
              "children": [
                {
                  "def": {
                    "template": "{0}[{1}][{2}] = {3}",
                    "category": "variables",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      },
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": false,
                    "isReporter": false
                  },
                  "values": [
                    "mundo",
                    "fila",
                    "col",
                    "cristal"
                  ],
                  "children": []
                },
                {
                  "def": {
                    "template": "{0} = {1}",
                    "category": "variables",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": false,
                    "isReporter": false
                  },
                  "values": [
                    "d",
                    "max([abs(fila - centro), abs(col - centro)])"
                  ],
                  "children": []
                },
                {
                  "def": {
                    "template": "if {0}:",
                    "category": "control",
                    "slots": [
                      {
                        "options": []
                      }
                    ],
                    "isContainer": true,
                    "isReporter": false
                  },
                  "values": [
                    "d > radio"
                  ],
                  "children": [
                    {
                      "def": {
                        "template": "{0} = {1}",
                        "category": "variables",
                        "slots": [
                          {
                            "options": []
                          },
                          {
                            "options": []
                          }
                        ],
                        "isContainer": false,
                        "isReporter": false
                      },
                      "values": [
                        "radio",
                        "d"
                      ],
                      "children": []
                    }
                  ]
                },
                {
                  "def": {
                    "template": "{0} = {1}",
                    "category": "variables",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": false,
                    "isReporter": false
                  },
                  "values": [
                    "angulo",
                    "random() * 2 * pi"
                  ],
                  "children": []
                },
                {
                  "def": {
                    "template": "{0} = {1}",
                    "category": "variables",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": false,
                    "isReporter": false
                  },
                  "values": [
                    "fila",
                    "(centro + int((radio + 3) * sin(angulo))) % n"
                  ],
                  "children": []
                },
                {
                  "def": {
                    "template": "{0} = {1}",
                    "category": "variables",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": false,
                    "isReporter": false
                  },
                  "values": [
                    "col",
                    "(centro + int((radio + 3) * cos(angulo))) % n"
                  ],
                  "children": []
                }
              ]
            },
            {
              "def": {
                "template": "else:",
                "category": "control",
                "slots": [],
                "isContainer": true,
                "isReporter": false
              },
              "values": [],
              "children": [
                {
                  "def": {
                    "template": "{0} = {1}",
                    "category": "variables",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": false,
                    "isReporter": false
                  },
                  "values": [
                    "fila",
                    "(fila + randint(-1, 1)) % n"
                  ],
                  "children": []
                },
                {
                  "def": {
                    "template": "{0} = {1}",
                    "category": "variables",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": false,
                    "isReporter": false
                  },
                  "values": [
                    "col",
                    "(col + randint(-1, 1)) % n"
                  ],
                  "children": []
                }
              ]
            },
            {
              "def": {
                "template": "{0}[{1}] = {2}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "filas",
                "k",
                "fila"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0}[{1}] = {2}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "columnas",
                "k",
                "col"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0} = {1}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "c",
                "caminantes[k]"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0}.goto({1}, {2})",
                "category": "tortuga",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "c",
                "-160 + col * espacio + espacio / 2",
                "-160 + fila * espacio + espacio / 2"
              ],
              "children": []
            }
          ]
        }
      ]
    }
  ]
}
