{
  "name": "juego_de_la_vida",
  "savedAt": "2026-07-23T20:55:55.287805",
  "blocks": [
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "n",
        "20"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "vivo",
        "(40, 200, 90)"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "muerto",
        "(10, 10, 25)"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = Patches({1}, {2})",
        "category": "tortuga",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "mundo",
        "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}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "estado",
                "muerto"
              ],
              "children": []
            },
            {
              "def": {
                "template": "if {0}:",
                "category": "control",
                "slots": [
                  {
                    "options": []
                  }
                ],
                "isContainer": true,
                "isReporter": false
              },
              "values": [
                "randint(0, 100) < 25"
              ],
              "children": [
                {
                  "def": {
                    "template": "{0} = {1}",
                    "category": "variables",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": false,
                    "isReporter": false
                  },
                  "values": [
                    "estado",
                    "vivo"
                  ],
                  "children": []
                }
              ]
            },
            {
              "def": {
                "template": "{0}[{1}][{2}] = {3}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  },
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "mundo",
                "i",
                "j",
                "estado"
              ],
              "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": [
            "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}",
                    "category": "variables",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": false,
                    "isReporter": false
                  },
                  "values": [
                    "vecinos",
                    "mundo.neighbors(i, j)"
                  ],
                  "children": []
                },
                {
                  "def": {
                    "template": "{0} = {1}",
                    "category": "variables",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": false,
                    "isReporter": false
                  },
                  "values": [
                    "vivos",
                    "0"
                  ],
                  "children": []
                },
                {
                  "def": {
                    "template": "for {0} in {1}:",
                    "category": "control",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": true,
                    "isReporter": false
                  },
                  "values": [
                    "v",
                    "vecinos"
                  ],
                  "children": [
                    {
                      "def": {
                        "template": "if {0}:",
                        "category": "control",
                        "slots": [
                          {
                            "options": []
                          }
                        ],
                        "isContainer": true,
                        "isReporter": false
                      },
                      "values": [
                        "v == vivo"
                      ],
                      "children": [
                        {
                          "def": {
                            "template": "{0} = {1}",
                            "category": "variables",
                            "slots": [
                              {
                                "options": []
                              },
                              {
                                "options": []
                              }
                            ],
                            "isContainer": false,
                            "isReporter": false
                          },
                          "values": [
                            "vivos",
                            "vivos + 1"
                          ],
                          "children": []
                        }
                      ]
                    }
                  ]
                },
                {
                  "def": {
                    "template": "{0} = {1}",
                    "category": "variables",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": false,
                    "isReporter": false
                  },
                  "values": [
                    "actual",
                    "mundo[i][j]"
                  ],
                  "children": []
                },
                {
                  "def": {
                    "template": "{0} = {1}",
                    "category": "variables",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": false,
                    "isReporter": false
                  },
                  "values": [
                    "siguiente",
                    "0"
                  ],
                  "children": []
                },
                {
                  "def": {
                    "template": "if {0}:",
                    "category": "control",
                    "slots": [
                      {
                        "options": []
                      }
                    ],
                    "isContainer": true,
                    "isReporter": false
                  },
                  "values": [
                    "actual == vivo"
                  ],
                  "children": [
                    {
                      "def": {
                        "template": "if {0}:",
                        "category": "control",
                        "slots": [
                          {
                            "options": []
                          }
                        ],
                        "isContainer": true,
                        "isReporter": false
                      },
                      "values": [
                        "vivos == 2 or vivos == 3"
                      ],
                      "children": [
                        {
                          "def": {
                            "template": "{0} = {1}",
                            "category": "variables",
                            "slots": [
                              {
                                "options": []
                              },
                              {
                                "options": []
                              }
                            ],
                            "isContainer": false,
                            "isReporter": false
                          },
                          "values": [
                            "siguiente",
                            "1"
                          ],
                          "children": []
                        }
                      ]
                    }
                  ]
                },
                {
                  "def": {
                    "template": "else:",
                    "category": "control",
                    "slots": [],
                    "isContainer": true,
                    "isReporter": false
                  },
                  "values": [],
                  "children": [
                    {
                      "def": {
                        "template": "if {0}:",
                        "category": "control",
                        "slots": [
                          {
                            "options": []
                          }
                        ],
                        "isContainer": true,
                        "isReporter": false
                      },
                      "values": [
                        "vivos == 3"
                      ],
                      "children": [
                        {
                          "def": {
                            "template": "{0} = {1}",
                            "category": "variables",
                            "slots": [
                              {
                                "options": []
                              },
                              {
                                "options": []
                              }
                            ],
                            "isContainer": false,
                            "isReporter": false
                          },
                          "values": [
                            "siguiente",
                            "1"
                          ],
                          "children": []
                        }
                      ]
                    }
                  ]
                },
                {
                  "def": {
                    "template": "{0}.setvalue({1}, {2}, {3})",
                    "category": "tortuga",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      },
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": false,
                    "isReporter": false
                  },
                  "values": [
                    "mundo",
                    "i",
                    "j",
                    "siguiente"
                  ],
                  "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": "if {0}:",
                    "category": "control",
                    "slots": [
                      {
                        "options": []
                      }
                    ],
                    "isContainer": true,
                    "isReporter": false
                  },
                  "values": [
                    "mundo.value(i, j) > 0.5"
                  ],
                  "children": [
                    {
                      "def": {
                        "template": "{0}[{1}][{2}] = {3}",
                        "category": "variables",
                        "slots": [
                          {
                            "options": []
                          },
                          {
                            "options": []
                          },
                          {
                            "options": []
                          },
                          {
                            "options": []
                          }
                        ],
                        "isContainer": false,
                        "isReporter": false
                      },
                      "values": [
                        "mundo",
                        "i",
                        "j",
                        "vivo"
                      ],
                      "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",
                        "i",
                        "j",
                        "muerto"
                      ],
                      "children": []
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
