{
  "name": "mapa_de_calor_diffuse",
  "savedAt": "2026-07-14T23:15:50.293759",
  "blocks": [
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "n",
        "25"
      ],
      "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": [
        "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",
                "(34, 139, 34)"
              ],
              "children": []
            }
          ]
        }
      ]
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "ovejas",
        "[]"
      ],
      "children": []
    },
    {
      "def": {
        "template": "for {0} in range({1}):",
        "category": "control",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": true,
        "isReporter": false
      },
      "values": [
        "k",
        "8"
      ],
      "children": [
        {
          "def": {
            "template": "{0} = Turtle()",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "oveja"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.shape({1})",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "oveja",
            "\"sheep\""
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.goto({1}, {2})",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "oveja",
            "randint(-140, 140)",
            "randint(-140, 140)"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.setheading({1})",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "oveja",
            "randint(0, 359)"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.append({1})",
            "category": "variables",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "ovejas",
            "oveja"
          ],
          "children": []
        }
      ]
    },
    {
      "def": {
        "template": "while {0}:",
        "category": "control",
        "slots": [
          {
            "options": []
          }
        ],
        "isContainer": true,
        "isReporter": false
      },
      "values": [
        "True"
      ],
      "children": [
        {
          "def": {
            "template": "for {0} in {1}:",
            "category": "control",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": true,
            "isReporter": false
          },
          "values": [
            "oveja",
            "ovejas"
          ],
          "children": [
            {
              "def": {
                "template": "{0}.right({1})",
                "category": "tortuga",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "oveja",
                "randint(0, 40) - 20"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0}.forward({1})",
                "category": "tortuga",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "oveja",
                "6"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0} = {1}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "colBruto",
                "int((oveja.xcor() + 160) / espacio)"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0} = {1}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "filaBruta",
                "int((oveja.ycor() + 160) / espacio)"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0} = {1}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "col",
                "max([0, min([n - 1, colBruto])])"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0} = {1}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "fila",
                "max([0, min([n - 1, filaBruta])])"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0} = {1}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "actual",
                "mundo[fila][col]"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0} = {1}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "r",
                "min([255, actual[0] + 40])"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0} = {1}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "g",
                "max([60, actual[1] - 15])"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0} = {1}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "b",
                "max([20, actual[2] - 5])"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0}[{1}][{2}] = {3}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  },
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "mundo",
                "fila",
                "col",
                "(r, g, b)"
              ],
              "children": []
            }
          ]
        },
        {
          "def": {
            "template": "{0}.diffuse({1})",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "mundo",
            "0.15"
          ],
          "children": []
        }
      ]
    }
  ]
}
