|
3 | 3 | #import "@preview/codly-languages:0.1.10": * |
4 | 4 | #import "@preview/gentle-clues:1.3.1": * |
5 | 5 | #import "@preview/pinit:0.2.2": * |
| 6 | + |
| 7 | +#import "@preview/fletcher:0.5.8" as fletcher: diagram, node, edge |
| 8 | +#import fletcher.shapes: diamond |
| 9 | + |
6 | 10 | #import "template.typ": setup-template, new-section-slide, inverted-slide |
7 | 11 |
|
8 | 12 | #show: codly-init.with() |
|
582 | 586 | #new-section-slide[Ejecución condicional] |
583 | 587 |
|
584 | 588 | #slide[ |
585 | | - = Titulo |
| 589 | + |
| 590 | + #place(center + horizon)[ |
| 591 | + #scale(90%)[ |
| 592 | + #diagram( |
| 593 | + spacing: (16mm, 12mm), |
| 594 | + node-stroke: 2pt, |
| 595 | + edge-stroke: 1.1pt, |
| 596 | + node-corner-radius: 3pt, |
| 597 | + |
| 598 | + node( |
| 599 | + (0,0), |
| 600 | + [Inicio], |
| 601 | + name: <inicio>, |
| 602 | + width: 30mm, |
| 603 | + fill: rgb("#c7d9c4"), |
| 604 | + stroke: rgb("#7cab69") |
| 605 | + ), |
| 606 | + |
| 607 | + node( |
| 608 | + (0, 2), |
| 609 | + [Hay humo?], |
| 610 | + name: <h1>, |
| 611 | + shape: diamond, |
| 612 | + width: 34mm, |
| 613 | + height: 24mm, |
| 614 | + fill: rgb("#efe4bf"), |
| 615 | + stroke: rgb("#d0aa43") |
| 616 | + ), |
| 617 | + |
| 618 | + node((3,2), align(center)[Querés\ sufrir?], name: <sufrir>, shape: diamond, |
| 619 | + width: 34mm, height: 24mm, fill: rgb("#efe4bf"), stroke: rgb("#d0aa43")), |
| 620 | + node((6,2), [Esperar un rato], name: <esperar>, width: 40mm, |
| 621 | + fill: rgb("#d9d0e2"), stroke: rgb("#8f73a8")), |
| 622 | + node((6,5), [Hay humo?], name: <h2>, shape: diamond, |
| 623 | + width: 34mm, height: 24mm, fill: rgb("#efe4bf"), stroke: rgb("#d0aa43")), |
| 624 | + node((0,5), [Salir afuera], name: <salir>, width: 36mm, |
| 625 | + fill: rgb("#d9d0e2"), stroke: rgb("#8f73a8")), |
| 626 | + node((0,7), [Fin], name: <fin>, width: 30mm, |
| 627 | + fill: rgb("#c7d9c4"), stroke: rgb("#7cab69")), |
| 628 | + |
| 629 | + edge(<inicio.south>, <h1.north>, "-|>"), |
| 630 | + edge(<h1.east>, <sufrir.west>, "-|>", [Sí]), |
| 631 | + edge(<h1.south>, <salir.north>, "-|>", [No]), |
| 632 | + edge(<sufrir.east>, <esperar.west>, "-|>", [No]), |
| 633 | + edge(<sufrir.south>, <salir.east>, "-|>", [Sí]), |
| 634 | + edge(<esperar.south>, <h2.north>, "-|>"), |
| 635 | + edge(<h2.west>, <salir.east>, "-|>", [No]), |
| 636 | + edge(<h2.east>, <esperar.east>, "-|>", [Sí], bend: -50deg), |
| 637 | + edge(<salir.south>, <fin.north>, "-|>"), |
| 638 | + ) |
| 639 | + ] |
| 640 | + ] |
| 641 | + |
586 | 642 | ] |
587 | 643 |
|
588 | 644 | #new-section-slide[Bucles] |
589 | 645 |
|
590 | 646 | #slide[ |
591 | | - |
| 647 | + = Titulo |
592 | 648 | ] |
593 | | - |
594 | | - |
595 | | - |
596 | | - |
|
0 commit comments