Buscaminas — percorso con deduzione (componente interattivo)
La stessa griglia, risolta con la logica pura: un ciclo a punto fisso (Per annidati + Consultar) applica le 2 regole di deduzione (se un numero ha già abbastanza celle vicine contrassegnate, il resto sono sicure; se gli mancano tante mine quante sono le celle vicine sconosciute, quelle sono tutte mine) finché la griglia intera non è liberata, senza indovinare nessuna cella. Mostra dal vivo perché "programmare bene" non è solo un modo di dire — qui significa letteralmente "non perdere mai".
Apri nell'editor →Algoritmo di esempio, pronto da eseguire passo passo nel browser. Senza installare nulla.
Diagramma di flusso
Pseudocodice
Algoritmo main
Escribir 'Buscaminas — camino con deducción: SOLO usa lógica, nunca adivina.'
filas <- 8
columnas <- 8
Activar('Buscaminas')
Configurar(filas, columnas)
Escribir 'Primer click en el centro (4,4) — siempre seguro.'
Pisar(4, 4)
huboProgreso <- Verdadero
Mientras huboProgreso
huboProgreso <- Falso
Para fila <- 1 Hasta filas
Para columna <- 1 Hasta columnas
Consultar(fila, columna)
valor <- response_call
Si valor != "cubierto" Y valor != "marcada"
marcadas <- 0
sinSaber <- 0
Para df <- -1 Hasta 1
Para dc <- -1 Hasta 1
Si NOT(df = 0 Y dc = 0)
vf <- fila + df
vc <- columna + dc
Si vf >= 1 Y vf <= filas Y vc >= 1 Y vc <= columnas
Consultar(vf, vc)
Si response_call = "marcada"
marcadas <- marcadas + 1
SiNo
Si response_call = "cubierto"
sinSaber <- sinSaber + 1
FinSi
FinSi
FinSi
FinSi
FinPara
FinPara
faltan <- valor - marcadas
Si sinSaber > 0 Y faltan = sinSaber
Para df <- -1 Hasta 1
Para dc <- -1 Hasta 1
Si NOT(df = 0 Y dc = 0)
vf <- fila + df
vc <- columna + dc
Si vf >= 1 Y vf <= filas Y vc >= 1 Y vc <= columnas
Consultar(vf, vc)
Si response_call = "cubierto"
Marcar(vf, vc)
huboProgreso <- Verdadero
FinSi
FinSi
FinSi
FinPara
FinPara
SiNo
Si sinSaber > 0 Y faltan = 0
Para df <- -1 Hasta 1
Para dc <- -1 Hasta 1
Si NOT(df = 0 Y dc = 0)
vf <- fila + df
vc <- columna + dc
Si vf >= 1 Y vf <= filas Y vc >= 1 Y vc <= columnas
Consultar(vf, vc)
Si response_call = "cubierto"
Pisar(vf, vc)
huboProgreso <- Verdadero
FinSi
FinSi
FinSi
FinPara
FinPara
FinSi
FinSi
FinSi
FinPara
FinPara
FinMientras
Escribir 'Listo — resuelto 100% por lógica, sin adivinar ninguna celda.'
FinAlgoritmo
Lo stesso algoritmo in Java
package org.desarrollo;
import java.util.ArrayList;
import java.util.Scanner;
/**
* Proyecto Java generado por freeDFDWeb a partir de un diagrama DFD.
*/
public class FreeDFDMain {
/**
* Punto de entrada del programa generado por freeDFDWeb.
*
* @param args no utilizado — freeDFDWeb no pasa argumentos de línea de comandos.
*/
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
double filas = 0.0;
double columnas = 0.0;
boolean huboProgreso = false;
double fila = 0.0;
double columna = 0.0;
double valor = 0.0;
double response_call = 0.0;
double marcadas = 0.0;
double sinSaber = 0.0;
double df = 0.0;
double dc = 0.0;
double vf = 0.0;
double vc = 0.0;
double faltan = 0.0;
System.out.println("Buscaminas — camino con deducción: SOLO usa lógica, nunca adivina.");
filas = 8;
columnas = 8;
System.out.println("Activar(" + "Buscaminas" + ")"); // Componente interactivo no disponible en el código exportado
Configurar(filas, columnas);
System.out.println("Primer click en el centro (4,4) — siempre seguro.");
Pisar(4, 4);
huboProgreso = true;
while ((huboProgreso)) {
huboProgreso = false;
double _forStart1 = 1;
double _forEnd1 = filas;
double _forStep1 = 1;
if (_forStep1 == 0) { throw new RuntimeException("El incremento de \"para fila\" no puede ser 0"); }
for (fila = _forStart1; _forStep1 > 0 ? fila <= _forEnd1 : fila >= _forEnd1; fila += _forStep1) {
double _forStart2 = 1;
double _forEnd2 = columnas;
double _forStep2 = 1;
if (_forStep2 == 0) { throw new RuntimeException("El incremento de \"para columna\" no puede ser 0"); }
for (columna = _forStart2; _forStep2 > 0 ? columna <= _forEnd2 : columna >= _forEnd2; columna += _forStep2) {
Consultar(fila, columna);
valor = response_call;
if (((((valor != "cubierto")) && ((valor != "marcada"))))) {
marcadas = 0;
sinSaber = 0;
double _forStart3 = -(1);
double _forEnd3 = 1;
double _forStep3 = 1;
if (_forStep3 == 0) { throw new RuntimeException("El incremento de \"para df\" no puede ser 0"); }
for (df = _forStart3; _forStep3 > 0 ? df <= _forEnd3 : df >= _forEnd3; df += _forStep3) {
double _forStart4 = -(1);
double _forEnd4 = 1;
double _forStep4 = 1;
if (_forStep4 == 0) { throw new RuntimeException("El incremento de \"para dc\" no puede ser 0"); }
for (dc = _forStart4; _forStep4 > 0 ? dc <= _forEnd4 : dc >= _forEnd4; dc += _forStep4) {
if ((!((((df == 0)) && ((dc == 0)))))) {
vf = (fila + df);
vc = (columna + dc);
if (((((((((vf >= 1)) && ((vf <= filas)))) && ((vc >= 1)))) && ((vc <= columnas))))) {
Consultar(vf, vc);
if (((response_call == "marcada"))) {
marcadas = (marcadas + 1);
} else {
if (((response_call == "cubierto"))) {
sinSaber = (sinSaber + 1);
}
}
}
}
}
}
faltan = (valor - marcadas);
if (((((sinSaber > 0)) && ((faltan == sinSaber))))) {
double _forStart5 = -(1);
double _forEnd5 = 1;
double _forStep5 = 1;
if (_forStep5 == 0) { throw new RuntimeException("El incremento de \"para df\" no puede ser 0"); }
for (df = _forStart5; _forStep5 > 0 ? df <= _forEnd5 : df >= _forEnd5; df += _forStep5) {
double _forStart6 = -(1);
double _forEnd6 = 1;
double _forStep6 = 1;
if (_forStep6 == 0) { throw new RuntimeException("El incremento de \"para dc\" no puede ser 0"); }
for (dc = _forStart6; _forStep6 > 0 ? dc <= _forEnd6 : dc >= _forEnd6; dc += _forStep6) {
if ((!((((df == 0)) && ((dc == 0)))))) {
vf = (fila + df);
vc = (columna + dc);
if (((((((((vf >= 1)) && ((vf <= filas)))) && ((vc >= 1)))) && ((vc <= columnas))))) {
Consultar(vf, vc);
if (((response_call == "cubierto"))) {
Marcar(vf, vc);
huboProgreso = true;
}
}
}
}
}
} else {
if (((((sinSaber > 0)) && ((faltan == 0))))) {
double _forStart7 = -(1);
double _forEnd7 = 1;
double _forStep7 = 1;
if (_forStep7 == 0) { throw new RuntimeException("El incremento de \"para df\" no puede ser 0"); }
for (df = _forStart7; _forStep7 > 0 ? df <= _forEnd7 : df >= _forEnd7; df += _forStep7) {
double _forStart8 = -(1);
double _forEnd8 = 1;
double _forStep8 = 1;
if (_forStep8 == 0) { throw new RuntimeException("El incremento de \"para dc\" no puede ser 0"); }
for (dc = _forStart8; _forStep8 > 0 ? dc <= _forEnd8 : dc >= _forEnd8; dc += _forStep8) {
if ((!((((df == 0)) && ((dc == 0)))))) {
vf = (fila + df);
vc = (columna + dc);
if (((((((((vf >= 1)) && ((vf <= filas)))) && ((vc >= 1)))) && ((vc <= columnas))))) {
Consultar(vf, vc);
if (((response_call == "cubierto"))) {
Pisar(vf, vc);
huboProgreso = true;
}
}
}
}
}
}
}
}
}
}
}
System.out.println("Listo — resuelto 100% por lógica, sin adivinar ninguna celda.");
}
static boolean readBoolean(Scanner scanner) {
String t = scanner.nextLine().trim().toLowerCase();
if (t.equals("verdadero") || t.equals("true") || t.equals("1")) return true;
if (t.equals("falso") || t.equals("false") || t.equals("0")) return false;
throw new RuntimeException("Se esperaba Verdadero o Falso, se recibio: " + t);
}
static double readDouble(Scanner scanner) {
return Double.parseDouble(scanner.nextLine().trim());
}
static ArrayList<Double> readVector(Scanner scanner) {
ArrayList<Double> result = new ArrayList<>();
for (String token : scanner.nextLine().split(",")) {
String t = token.trim();
if (!t.isEmpty()) result.add(Double.parseDouble(t));
}
return result;
}
/** Formatea un double sin ".0" final cuando es entero — replica cómo freeDFDWeb (JS) imprime números, ej. factorial(5) debe mostrar "120", no "120.0". */
static String fmt(double d) {
if (!Double.isInfinite(d) && !Double.isNaN(d) && d == Math.floor(d) && Math.abs(d) < 1e15) {
return String.valueOf((long) d);
}
return String.valueOf(d);
}
/** `String.valueOf(true)` da "true" — el pseudolenguaje escribe e imprime "Verdadero"/"Falso". */
static String boolStr(boolean b) {
return b ? "Verdadero" : "Falso";
}
/** `ToChar(n)` de Flowgorithm: código de carácter → carácter. `Character.toChars` cubre también los puntos fuera del BMP (emoji), que no caben en un `char`. */
static String toChar(double code) {
int c = (int) code;
if (c < 0 || c > 0x10FFFF) {
throw new RuntimeException("ToChar(" + c + "): codigo de caracter fuera de rango");
}
return new String(Character.toChars(c));
}
/** `ToFixed(r, i)` de Flowgorithm: TRUNCA a `i` decimales, no redondea. `Locale.ROOT` para que el separador sea el punto siempre, igual que el resto del generador. */
static String toFixed(double value, double digits) {
int d = (int) digits;
double factor = Math.pow(10, d);
double truncated = (double)(long)(value * factor) / factor;
return String.format(java.util.Locale.ROOT, "%." + d + "f", truncated);
}
static double vecGet(ArrayList<Double> v, int index) {
int i = index - 1;
if (i < 0 || i >= v.size() || v.get(i) == null) {
throw new RuntimeException("La posición " + index + " del vector no tiene un valor asignado todavía");
}
return v.get(i);
}
static void vecSet(ArrayList<Double> v, int index, double value) {
int i = index - 1;
while (v.size() <= i) v.add(null);
v.set(i, value);
}
static double div(double a, double b) {
if (b == 0) throw new ArithmeticException("División por cero");
return a / b;
}
static double mod(double a, double b) {
if (b == 0) throw new ArithmeticException("Módulo por cero");
return a % b;
}
static void sleep(double seconds) {
try { Thread.sleep((long) (seconds * 1000)); } catch (InterruptedException e) { Thread.currentThread().interrupt(); }
}
}
Lo stesso algoritmo in Python
#!/usr/bin/env python3
"""
Programa generado por freeDFDWeb — pseudocódigo exportado a Python.
Para correr: python3 main.py (ver README.md)
"""
import math
import random
import sys
import time
import datetime
class DfdRuntimeError(Exception):
pass
def read_boolean():
t = input().strip().lower()
if t in ('verdadero', 'true', '1'):
return True
if t in ('falso', 'false', '0'):
return False
raise DfdRuntimeError('Se esperaba Verdadero o Falso, se recibio: ' + t)
def read_double():
return float(input().strip())
def read_vector():
return [float(t.strip()) for t in input().split(',') if t.strip() != '']
def fmt(d):
"""Formatea sin ".0" final cuando es entero — replica cómo freeDFDWeb (JS) imprime números."""
if math.isinf(d):
return 'Infinity' if d > 0 else '-Infinity'
if math.isnan(d):
return 'NaN'
if d == math.floor(d) and abs(d) < 1e15:
return str(int(d))
return str(d)
def bool_str(b):
"""`str(True)` da "True" (mayúscula) — el pseudolenguaje escribe e imprime "Verdadero"/"Falso"."""
return 'Verdadero' if b else 'Falso'
def sgn(x):
"""`Sgn(n)` de Flowgorithm. Devuelve x tal cual en el cero para conservar el signo del -0.0, igual que `Math.sign` de JS."""
if math.isnan(x):
return x
if x > 0:
return 1.0
if x < 0:
return -1.0
return x
def to_fixed(value, digits):
"""`ToFixed(r, i)` de Flowgorithm: TRUNCA a i decimales, no redondea."""
d = int(digits)
factor = 10 ** d
truncated = math.trunc(value * factor) / factor
return f'{truncated:.{d}f}'
def vec_get(v, index):
i = index - 1
if i < 0 or i >= len(v) or v[i] is None:
raise DfdRuntimeError(f'La posición {index} del vector no tiene un valor asignado todavía')
return v[i]
def vec_set(v, index, value):
i = index - 1
while len(v) <= i:
v.append(None)
v[i] = value
def div(a, b):
if b == 0:
raise DfdRuntimeError('División por cero')
return a / b
def mod(a, b):
if b == 0:
raise DfdRuntimeError('Módulo por cero')
# `math.fmod`, NUNCA el `%` nativo de Python — el signo del resultado de
# `%` en Python sigue al DIVISOR (-7 % 3 == 2), mientras que JS (y el
# intérprete real) usan resto con signo del DIVIDENDO (-7 % 3 == -1),
# que es exactamente lo que `math.fmod` reproduce.
return math.fmod(a, b)
def redon(x):
"""Redondeo tipo `Math.round` de JS (.5 siempre hacia +Infinity) — NUNCA `round()` nativo de Python (redondeo bancario: round(2.5) == 2)."""
return math.floor(x + 0.5)
def main():
print("Buscaminas — camino con deducción: SOLO usa lógica, nunca adivina.")
filas = 8
columnas = 8
print("Activar(" + "Buscaminas" + ")") # Componente interactivo no disponible en el código exportado
Configurar(filas, columnas)
print("Primer click en el centro (4,4) — siempre seguro.")
Pisar(4, 4)
huboProgreso = True
while huboProgreso:
huboProgreso = False
_for_start_1 = 1
_for_end_1 = filas
_for_step_1 = 1
if _for_step_1 == 0:
raise DfdRuntimeError('El incremento de "para fila" no puede ser 0')
fila = _for_start_1
while (fila <= _for_end_1) if _for_step_1 > 0 else (fila >= _for_end_1):
_for_start_2 = 1
_for_end_2 = columnas
_for_step_2 = 1
if _for_step_2 == 0:
raise DfdRuntimeError('El incremento de "para columna" no puede ser 0')
columna = _for_start_2
while (columna <= _for_end_2) if _for_step_2 > 0 else (columna >= _for_end_2):
Consultar(fila, columna)
valor = response_call
if ((valor != "cubierto") and (valor != "marcada")):
marcadas = 0
sinSaber = 0
_for_start_3 = -(1)
_for_end_3 = 1
_for_step_3 = 1
if _for_step_3 == 0:
raise DfdRuntimeError('El incremento de "para df" no puede ser 0')
df = _for_start_3
while (df <= _for_end_3) if _for_step_3 > 0 else (df >= _for_end_3):
_for_start_4 = -(1)
_for_end_4 = 1
_for_step_4 = 1
if _for_step_4 == 0:
raise DfdRuntimeError('El incremento de "para dc" no puede ser 0')
dc = _for_start_4
while (dc <= _for_end_4) if _for_step_4 > 0 else (dc >= _for_end_4):
if (not ((df == 0) and (dc == 0))):
vf = (fila + df)
vc = (columna + dc)
if ((((vf >= 1) and (vf <= filas)) and (vc >= 1)) and (vc <= columnas)):
Consultar(vf, vc)
if (response_call == "marcada"):
marcadas = (marcadas + 1)
else:
if (response_call == "cubierto"):
sinSaber = (sinSaber + 1)
dc += _for_step_4
df += _for_step_3
faltan = (valor - marcadas)
if ((sinSaber > 0) and (faltan == sinSaber)):
_for_start_5 = -(1)
_for_end_5 = 1
_for_step_5 = 1
if _for_step_5 == 0:
raise DfdRuntimeError('El incremento de "para df" no puede ser 0')
df = _for_start_5
while (df <= _for_end_5) if _for_step_5 > 0 else (df >= _for_end_5):
_for_start_6 = -(1)
_for_end_6 = 1
_for_step_6 = 1
if _for_step_6 == 0:
raise DfdRuntimeError('El incremento de "para dc" no puede ser 0')
dc = _for_start_6
while (dc <= _for_end_6) if _for_step_6 > 0 else (dc >= _for_end_6):
if (not ((df == 0) and (dc == 0))):
vf = (fila + df)
vc = (columna + dc)
if ((((vf >= 1) and (vf <= filas)) and (vc >= 1)) and (vc <= columnas)):
Consultar(vf, vc)
if (response_call == "cubierto"):
Marcar(vf, vc)
huboProgreso = True
dc += _for_step_6
df += _for_step_5
else:
if ((sinSaber > 0) and (faltan == 0)):
_for_start_7 = -(1)
_for_end_7 = 1
_for_step_7 = 1
if _for_step_7 == 0:
raise DfdRuntimeError('El incremento de "para df" no puede ser 0')
df = _for_start_7
while (df <= _for_end_7) if _for_step_7 > 0 else (df >= _for_end_7):
_for_start_8 = -(1)
_for_end_8 = 1
_for_step_8 = 1
if _for_step_8 == 0:
raise DfdRuntimeError('El incremento de "para dc" no puede ser 0')
dc = _for_start_8
while (dc <= _for_end_8) if _for_step_8 > 0 else (dc >= _for_end_8):
if (not ((df == 0) and (dc == 0))):
vf = (fila + df)
vc = (columna + dc)
if ((((vf >= 1) and (vf <= filas)) and (vc >= 1)) and (vc <= columnas)):
Consultar(vf, vc)
if (response_call == "cubierto"):
Pisar(vf, vc)
huboProgreso = True
dc += _for_step_8
df += _for_step_7
columna += _for_step_2
fila += _for_step_1
print("Listo — resuelto 100% por lógica, sin adivinar ninguna celda.")
if __name__ == '__main__':
main()
Lo stesso algoritmo in C#
using System;
using System.Collections.Generic;
using System.Globalization;
/// <summary>Excepción propia para errores de ejecución del programa generado (división por cero, índice de vector sin asignar, etc.) — mismo criterio que el `RuntimeError` real de freeDFDWeb.</summary>
class DfdRuntimeException : Exception {
public DfdRuntimeException(string message) : base(message) { }
}
/// <summary>
/// Proyecto C# generado por freeDFDWeb a partir de un diagrama DFD.
/// </summary>
class Program {
/// <summary>
/// Punto de entrada del programa generado por freeDFDWeb.
/// </summary>
/// <param name="args">no utilizado — freeDFDWeb no pasa argumentos de línea de comandos.</param>
static void Main(string[] args) {
CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
double filas = 0.0;
double columnas = 0.0;
bool huboProgreso = false;
double fila = 0.0;
double columna = 0.0;
double valor = 0.0;
double response_call = 0.0;
double marcadas = 0.0;
double sinSaber = 0.0;
double df = 0.0;
double dc = 0.0;
double vf = 0.0;
double vc = 0.0;
double faltan = 0.0;
Console.WriteLine("Buscaminas — camino con deducción: SOLO usa lógica, nunca adivina.");
filas = 8;
columnas = 8;
Console.WriteLine("Activar(" + "Buscaminas" + ")"); // Componente interactivo no disponible en el código exportado
Configurar(filas, columnas);
Console.WriteLine("Primer click en el centro (4,4) — siempre seguro.");
Pisar(4, 4);
huboProgreso = true;
while (huboProgreso) {
huboProgreso = false;
double _forStart1 = 1;
double _forEnd1 = filas;
double _forStep1 = 1;
if (_forStep1 == 0) { throw new DfdRuntimeException("El incremento de \"para fila\" no puede ser 0"); }
for (fila = _forStart1; _forStep1 > 0 ? fila <= _forEnd1 : fila >= _forEnd1; fila += _forStep1) {
double _forStart2 = 1;
double _forEnd2 = columnas;
double _forStep2 = 1;
if (_forStep2 == 0) { throw new DfdRuntimeException("El incremento de \"para columna\" no puede ser 0"); }
for (columna = _forStart2; _forStep2 > 0 ? columna <= _forEnd2 : columna >= _forEnd2; columna += _forStep2) {
Consultar(fila, columna);
valor = response_call;
if (((valor != "cubierto") && (valor != "marcada"))) {
marcadas = 0;
sinSaber = 0;
double _forStart3 = -(1);
double _forEnd3 = 1;
double _forStep3 = 1;
if (_forStep3 == 0) { throw new DfdRuntimeException("El incremento de \"para df\" no puede ser 0"); }
for (df = _forStart3; _forStep3 > 0 ? df <= _forEnd3 : df >= _forEnd3; df += _forStep3) {
double _forStart4 = -(1);
double _forEnd4 = 1;
double _forStep4 = 1;
if (_forStep4 == 0) { throw new DfdRuntimeException("El incremento de \"para dc\" no puede ser 0"); }
for (dc = _forStart4; _forStep4 > 0 ? dc <= _forEnd4 : dc >= _forEnd4; dc += _forStep4) {
if (!((df == 0) && (dc == 0))) {
vf = (fila + df);
vc = (columna + dc);
if (((((vf >= 1) && (vf <= filas)) && (vc >= 1)) && (vc <= columnas))) {
Consultar(vf, vc);
if ((response_call == "marcada")) {
marcadas = (marcadas + 1);
} else {
if ((response_call == "cubierto")) {
sinSaber = (sinSaber + 1);
}
}
}
}
}
}
faltan = (valor - marcadas);
if (((sinSaber > 0) && (faltan == sinSaber))) {
double _forStart5 = -(1);
double _forEnd5 = 1;
double _forStep5 = 1;
if (_forStep5 == 0) { throw new DfdRuntimeException("El incremento de \"para df\" no puede ser 0"); }
for (df = _forStart5; _forStep5 > 0 ? df <= _forEnd5 : df >= _forEnd5; df += _forStep5) {
double _forStart6 = -(1);
double _forEnd6 = 1;
double _forStep6 = 1;
if (_forStep6 == 0) { throw new DfdRuntimeException("El incremento de \"para dc\" no puede ser 0"); }
for (dc = _forStart6; _forStep6 > 0 ? dc <= _forEnd6 : dc >= _forEnd6; dc += _forStep6) {
if (!((df == 0) && (dc == 0))) {
vf = (fila + df);
vc = (columna + dc);
if (((((vf >= 1) && (vf <= filas)) && (vc >= 1)) && (vc <= columnas))) {
Consultar(vf, vc);
if ((response_call == "cubierto")) {
Marcar(vf, vc);
huboProgreso = true;
}
}
}
}
}
} else {
if (((sinSaber > 0) && (faltan == 0))) {
double _forStart7 = -(1);
double _forEnd7 = 1;
double _forStep7 = 1;
if (_forStep7 == 0) { throw new DfdRuntimeException("El incremento de \"para df\" no puede ser 0"); }
for (df = _forStart7; _forStep7 > 0 ? df <= _forEnd7 : df >= _forEnd7; df += _forStep7) {
double _forStart8 = -(1);
double _forEnd8 = 1;
double _forStep8 = 1;
if (_forStep8 == 0) { throw new DfdRuntimeException("El incremento de \"para dc\" no puede ser 0"); }
for (dc = _forStart8; _forStep8 > 0 ? dc <= _forEnd8 : dc >= _forEnd8; dc += _forStep8) {
if (!((df == 0) && (dc == 0))) {
vf = (fila + df);
vc = (columna + dc);
if (((((vf >= 1) && (vf <= filas)) && (vc >= 1)) && (vc <= columnas))) {
Consultar(vf, vc);
if ((response_call == "cubierto")) {
Pisar(vf, vc);
huboProgreso = true;
}
}
}
}
}
}
}
}
}
}
}
Console.WriteLine("Listo — resuelto 100% por lógica, sin adivinar ninguna celda.");
}
static readonly Random Rnd = new Random();
static bool ReadBoolean() {
string t = (Console.ReadLine() ?? "").Trim().ToLowerInvariant();
if (t == "verdadero" || t == "true" || t == "1") return true;
if (t == "falso" || t == "false" || t == "0") return false;
throw new Exception("Se esperaba Verdadero o Falso, se recibio: " + t);
}
static double ReadDouble() {
return double.Parse(Console.ReadLine().Trim(), CultureInfo.InvariantCulture);
}
static List<double?> ReadVector() {
List<double?> result = new List<double?>();
foreach (string token in Console.ReadLine().Split(',')) {
string t = token.Trim();
if (t.Length > 0) result.Add(double.Parse(t, CultureInfo.InvariantCulture));
}
return result;
}
/// <summary>Formatea un double sin ".0" final cuando es entero — replica cómo freeDFDWeb (JS) imprime números.</summary>
static string Fmt(double d) {
if (double.IsPositiveInfinity(d)) return "Infinity";
if (double.IsNegativeInfinity(d)) return "-Infinity";
if (double.IsNaN(d)) return "NaN";
if (d == Math.Floor(d) && Math.Abs(d) < 1e15) {
return ((long)d).ToString(CultureInfo.InvariantCulture);
}
return d.ToString(CultureInfo.InvariantCulture);
}
/// <summary>`true.ToString()` da "True" (mayúscula) — el pseudolenguaje escribe e imprime "Verdadero"/"Falso".</summary>
static string BoolStr(bool b) {
return b ? "Verdadero" : "Falso";
}
/// <summary>`Sgn(n)` de Flowgorithm. Helper y no `Math.Sign`: ese LANZA sobre NaN, mientras el intérprete devuelve NaN. Devuelve x en el cero para conservar el -0.0.</summary>
static double Sgn(double x) {
if (double.IsNaN(x)) return x;
if (x > 0) return 1.0;
if (x < 0) return -1.0;
return x;
}
/// <summary>`ToFixed(r, i)` de Flowgorithm: TRUNCA a i decimales, no redondea. `InvariantCulture` para que el separador sea el punto, igual que `Fmt`.</summary>
static string ToFixed(double value, double digits) {
int d = (int) digits;
double factor = Math.Pow(10, d);
double truncated = Math.Truncate(value * factor) / factor;
return truncated.ToString("F" + d, CultureInfo.InvariantCulture);
}
static double VecGet(List<double?> v, int index) {
int i = index - 1;
if (i < 0 || i >= v.Count || !v[i].HasValue) {
throw new DfdRuntimeException("La posición " + index + " del vector no tiene un valor asignado todavía");
}
return v[i].Value;
}
static void VecSet(List<double?> v, int index, double value) {
int i = index - 1;
while (v.Count <= i) v.Add(null);
v[i] = value;
}
static double Div(double a, double b) {
if (b == 0) throw new DfdRuntimeException("División por cero");
return a / b;
}
static double Mod(double a, double b) {
if (b == 0) throw new DfdRuntimeException("Módulo por cero");
// El operador `%` nativo de C# para `double` SÍ coincide con el
// signo de JS (confirmado real: -7 % 3 == -1 en ambos) — a
// diferencia de Python, no hace falta ningún wrapper de signo.
return a % b;
}
/// <summary>Redondeo tipo `Math.round` de JS (.5 siempre hacia +Infinity) — NUNCA `Math.Round()` directo (bancario en .NET: Math.Round(2.5) == 2).</summary>
static double Redon(double x) {
return Math.Floor(x + 0.5);
}
}
Lo stesso algoritmo in C++
#include <iostream>
#include <string>
#include <vector>
#include <optional>
#include <cmath>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <chrono>
#include <thread>
#include <charconv>
#include <stdexcept>
/**
* Programa C++ generado por freeDFDWeb a partir de un diagrama DFD.
*/
const double PI = 3.14159265358979323846;
class DfdRuntimeError : public std::runtime_error {
public:
explicit DfdRuntimeError(const std::string& message) : std::runtime_error(message) {}
};
std::string readLine() {
std::string line;
if (!std::getline(std::cin, line)) return "";
if (!line.empty() && line.back() == '\r') line.pop_back();
return line;
}
/** `std::stod` (usado por `toNumberOrThrow`) NO tira con texto no numérico de forma consistente en todos los casos (ignora sufijos raros) pero SÍ tira `std::invalid_argument` con texto totalmente no numérico — verificado real. Envuelto para relanzar como `DfdRuntimeError`, mismo tipo de excepción que el resto del programa generado. */
double toNumberOrThrow(const std::string& value) {
try {
return std::stod(value);
} catch (const std::exception&) {
throw DfdRuntimeError("Se esperaba un número, se encontró \"" + value + "\"");
}
}
bool readBoolean() {
std::string t = readLine();
for (auto& c : t) c = (char)std::tolower((unsigned char)c);
if (t == "verdadero" || t == "true" || t == "1") return true;
if (t == "falso" || t == "false" || t == "0") return false;
throw std::runtime_error("Se esperaba Verdadero o Falso, se recibio: " + t);
}
double readDouble() {
return toNumberOrThrow(readLine());
}
std::vector<std::optional<double>> readVector() {
std::vector<std::optional<double>> result;
std::stringstream ss(readLine());
std::string token;
while (std::getline(ss, token, ',')) {
size_t start = token.find_first_not_of(" \t");
size_t end = token.find_last_not_of(" \t");
if (start == std::string::npos) continue;
result.push_back(toNumberOrThrow(token.substr(start, end - start + 1)));
}
return result;
}
/** Formatea sin ".0" final cuando es entero, con representación de ida y vuelta exacta para decimales (`std::to_chars`, C++17) — replica cómo freeDFDWeb (JS) imprime números. Diverge de JS solo en notación científica de magnitudes extremas (ver comentario de cabecera del archivo), gap aceptado. */
std::string fmt(double d) {
if (std::isinf(d)) return d > 0 ? "Infinity" : "-Infinity";
if (std::isnan(d)) return "NaN";
char buf[64];
if (d == std::floor(d) && std::abs(d) < 1e15) {
auto res = std::to_chars(buf, buf + sizeof(buf), (long long)d);
return std::string(buf, res.ptr);
}
auto res = std::to_chars(buf, buf + sizeof(buf), d);
return std::string(buf, res.ptr);
}
/** `std::cout << bool` imprime "1"/"0" — el pseudolenguaje escribe e imprime "Verdadero"/"Falso". */
std::string boolStr(bool b) {
return b ? "Verdadero" : "Falso";
}
/** `Sgn(n)` de Flowgorithm. Devuelve x en el cero para conservar el signo del -0.0, igual que `Math.sign` de JS. */
double sgn(double x) {
if (std::isnan(x)) return x;
if (x > 0) return 1.0;
if (x < 0) return -1.0;
return x;
}
/** `ToChar(n)`: punto de código → carácter. C++ es el único destino sin conversión nativa, así que codifica UTF-8 a mano — `std::string` acá son bytes, no puntos de código. */
std::string toCharStr(double code) {
long long c = (long long) code;
if (c < 0 || c > 0x10FFFF) {
throw DfdRuntimeError("ToChar(" + std::to_string(c) + "): codigo de caracter fuera de rango");
}
std::string out;
if (c < 0x80) {
out += (char)c;
} else if (c < 0x800) {
out += (char)(0xC0 | (c >> 6));
out += (char)(0x80 | (c & 0x3F));
} else if (c < 0x10000) {
out += (char)(0xE0 | (c >> 12));
out += (char)(0x80 | ((c >> 6) & 0x3F));
out += (char)(0x80 | (c & 0x3F));
} else {
out += (char)(0xF0 | (c >> 18));
out += (char)(0x80 | ((c >> 12) & 0x3F));
out += (char)(0x80 | ((c >> 6) & 0x3F));
out += (char)(0x80 | (c & 0x3F));
}
return out;
}
/** `ToCode(c)`: inversa de `toCharStr` — decodifica el PRIMER punto de código UTF-8, no el primer byte (si no, una "ñ" daría 195). */
double toCode(const std::string& s) {
if (s.empty()) {
throw DfdRuntimeError("ToCode espera un texto de un caracter");
}
unsigned char b0 = (unsigned char)s[0];
if (b0 < 0x80) return (double)b0;
int extra = (b0 >= 0xF0) ? 3 : (b0 >= 0xE0) ? 2 : 1;
long long cp = b0 & (0x3F >> extra);
for (int i = 1; i <= extra; i++) {
if ((size_t)i >= s.size()) {
throw DfdRuntimeError("ToCode: texto UTF-8 mal formado");
}
cp = (cp << 6) | ((unsigned char)s[i] & 0x3F);
}
return (double)cp;
}
/** `ToFixed(r, i)` de Flowgorithm: TRUNCA a i decimales, no redondea. */
std::string toFixed(double value, double digits) {
int d = (int) digits;
double factor = std::pow(10.0, d);
double truncated = std::trunc(value * factor) / factor;
std::ostringstream out;
out << std::fixed << std::setprecision(d) << truncated;
return out.str();
}
std::string toUpperStr(const std::string& s) {
std::string result = s;
std::transform(result.begin(), result.end(), result.begin(), [](unsigned char c) { return std::toupper(c); });
return result;
}
std::string toLowerStr(const std::string& s) {
std::string result = s;
std::transform(result.begin(), result.end(), result.begin(), [](unsigned char c) { return std::tolower(c); });
return result;
}
double vecGet(std::vector<std::optional<double>>& v, int index) {
int i = index - 1;
if (i < 0 || (size_t)i >= v.size() || !v[i].has_value()) {
throw DfdRuntimeError("La posición " + std::to_string(index) + " del vector no tiene un valor asignado todavía");
}
return *v[i];
}
void vecSet(std::vector<std::optional<double>>& v, int index, double value) {
int i = index - 1;
if ((size_t)(i + 1) > v.size()) v.resize(i + 1);
v[i] = value;
}
/**
* `dividir` y no `div`, que sería el nombre obvio: `div` YA EXISTE en la
* biblioteca estándar de C (`<cstdlib>`, devuelve un `div_t`) y está
* declarada aunque no se incluya ese encabezado. Con dos literales
* enteros, `div(7, 2)` resuelve a la versión de C —coincidencia exacta—
* y el programa generado NO COMPILA:
*
* error: cannot convert 'div_t' to 'double'
*
* O sea: CUALQUIER programa con una división fallaba al exportar a C++.
* Encontrado el 30-oct-2026 compilando de verdad lo exportado
* (`scripts/equivalencia/comparar.mjs`); ninguna prueba lo veía porque
* ninguna compilaba C++.
*/
double dividir(double a, double b) {
if (b == 0) throw DfdRuntimeError("División por cero");
return a / b;
}
double mod(double a, double b) {
if (b == 0) throw DfdRuntimeError("Módulo por cero");
// `%` NO COMPILA sobre `double` en C++ — `std::fmod` es la única forma.
// Su signo SÍ coincide con JS (confirmado real), a diferencia de
// Python, que necesitaba un wrapper de signo además del de cero.
return std::fmod(a, b);
}
/** Redondeo tipo `Math.round` de JS (.5 siempre hacia +Infinity) — NUNCA `std::round()` directo (redondea siempre alejándose de cero: round(-2.5) == -3, distinto de Math.round(-2.5) == -2). */
double redon(double x) {
return std::floor(x + 0.5);
}
// ---------------------------------------------------------------------------
// Programa
// ---------------------------------------------------------------------------
/**
* Punto de entrada del programa generado por freeDFDWeb.
*/
int main() {
double filas = 0.0;
double columnas = 0.0;
bool huboProgreso = false;
double fila = 0.0;
double columna = 0.0;
double valor = 0.0;
double response_call = 0.0;
double marcadas = 0.0;
double sinSaber = 0.0;
double df = 0.0;
double dc = 0.0;
double vf = 0.0;
double vc = 0.0;
double faltan = 0.0;
std::cout << std::string("Buscaminas — camino con deducción: SOLO usa lógica, nunca adivina.") << "\n";
filas = 8;
columnas = 8;
std::cout << (std::string("Activar(") + std::string("Buscaminas") + ")") << "\n"; // Componente interactivo no disponible en el código exportado
Configurar(filas, columnas);
std::cout << std::string("Primer click en el centro (4,4) — siempre seguro.") << "\n";
Pisar(4, 4);
huboProgreso = true;
while (huboProgreso) {
huboProgreso = false;
double _forStart1 = 1;
double _forEnd1 = filas;
double _forStep1 = 1;
if (_forStep1 == 0) { throw DfdRuntimeError("El incremento de \"para fila\" no puede ser 0"); }
for (fila = _forStart1; _forStep1 > 0 ? fila <= _forEnd1 : fila >= _forEnd1; fila += _forStep1) {
double _forStart2 = 1;
double _forEnd2 = columnas;
double _forStep2 = 1;
if (_forStep2 == 0) { throw DfdRuntimeError("El incremento de \"para columna\" no puede ser 0"); }
for (columna = _forStart2; _forStep2 > 0 ? columna <= _forEnd2 : columna >= _forEnd2; columna += _forStep2) {
Consultar(fila, columna);
valor = response_call;
if (((valor != std::string("cubierto")) && (valor != std::string("marcada")))) {
marcadas = 0;
sinSaber = 0;
double _forStart3 = -(1);
double _forEnd3 = 1;
double _forStep3 = 1;
if (_forStep3 == 0) { throw DfdRuntimeError("El incremento de \"para df\" no puede ser 0"); }
for (df = _forStart3; _forStep3 > 0 ? df <= _forEnd3 : df >= _forEnd3; df += _forStep3) {
double _forStart4 = -(1);
double _forEnd4 = 1;
double _forStep4 = 1;
if (_forStep4 == 0) { throw DfdRuntimeError("El incremento de \"para dc\" no puede ser 0"); }
for (dc = _forStart4; _forStep4 > 0 ? dc <= _forEnd4 : dc >= _forEnd4; dc += _forStep4) {
if (!((df == 0) && (dc == 0))) {
vf = (fila + df);
vc = (columna + dc);
if (((((vf >= 1) && (vf <= filas)) && (vc >= 1)) && (vc <= columnas))) {
Consultar(vf, vc);
if ((response_call == std::string("marcada"))) {
marcadas = (marcadas + 1);
} else {
if ((response_call == std::string("cubierto"))) {
sinSaber = (sinSaber + 1);
}
}
}
}
}
}
faltan = (valor - marcadas);
if (((sinSaber > 0) && (faltan == sinSaber))) {
double _forStart5 = -(1);
double _forEnd5 = 1;
double _forStep5 = 1;
if (_forStep5 == 0) { throw DfdRuntimeError("El incremento de \"para df\" no puede ser 0"); }
for (df = _forStart5; _forStep5 > 0 ? df <= _forEnd5 : df >= _forEnd5; df += _forStep5) {
double _forStart6 = -(1);
double _forEnd6 = 1;
double _forStep6 = 1;
if (_forStep6 == 0) { throw DfdRuntimeError("El incremento de \"para dc\" no puede ser 0"); }
for (dc = _forStart6; _forStep6 > 0 ? dc <= _forEnd6 : dc >= _forEnd6; dc += _forStep6) {
if (!((df == 0) && (dc == 0))) {
vf = (fila + df);
vc = (columna + dc);
if (((((vf >= 1) && (vf <= filas)) && (vc >= 1)) && (vc <= columnas))) {
Consultar(vf, vc);
if ((response_call == std::string("cubierto"))) {
Marcar(vf, vc);
huboProgreso = true;
}
}
}
}
}
} else {
if (((sinSaber > 0) && (faltan == 0))) {
double _forStart7 = -(1);
double _forEnd7 = 1;
double _forStep7 = 1;
if (_forStep7 == 0) { throw DfdRuntimeError("El incremento de \"para df\" no puede ser 0"); }
for (df = _forStart7; _forStep7 > 0 ? df <= _forEnd7 : df >= _forEnd7; df += _forStep7) {
double _forStart8 = -(1);
double _forEnd8 = 1;
double _forStep8 = 1;
if (_forStep8 == 0) { throw DfdRuntimeError("El incremento de \"para dc\" no puede ser 0"); }
for (dc = _forStart8; _forStep8 > 0 ? dc <= _forEnd8 : dc >= _forEnd8; dc += _forStep8) {
if (!((df == 0) && (dc == 0))) {
vf = (fila + df);
vc = (columna + dc);
if (((((vf >= 1) && (vf <= filas)) && (vc >= 1)) && (vc <= columnas))) {
Consultar(vf, vc);
if ((response_call == std::string("cubierto"))) {
Pisar(vf, vc);
huboProgreso = true;
}
}
}
}
}
}
}
}
}
}
}
std::cout << std::string("Listo — resuelto 100% por lógica, sin adivinar ninguna celda.") << "\n";
return 0;
}
Lo stesso algoritmo in TypeScript
import * as fs from 'fs';
/**
* Generado por freeDFDWeb, sin descripción en el diagrama original.
*/
class DfdRuntimeError extends Error {}
const inputLines: string[] = fs.readFileSync(0, 'utf-8').split('\n');
let inputIndex = 0;
/** Toda la entrada se lee de una sola vez al arrancar (ver cabecera del archivo) — cada llamada consume la siguiente línea ya bufferizada. */
function readLine(): string {
return (inputLines[inputIndex++] ?? '').replace(/\r$/, '');
}
function readBoolean(): boolean {
const t = readLine().trim().toLowerCase();
if (t === 'verdadero' || t === 'true' || t === '1') return true;
if (t === 'falso' || t === 'false' || t === '0') return false;
throw new Error('Se esperaba Verdadero o Falso, se recibio: ' + t);
}
function readDouble(): number {
return toNumberOrThrow(readLine().trim());
}
function readVector(): (number | undefined)[] {
return readLine()
.split(',')
.map((t) => t.trim())
.filter((t) => t.length > 0)
.map((t) => toNumberOrThrow(t));
}
/** `Number(x)` nativo no tira error con texto no numérico (da `NaN`) — a diferencia del intérprete real (`toNumber`), que sí tira. Único punto donde este generador necesita reproducir ese comportamiento a mano. */
function toNumberOrThrow(value: string | number): number {
const n = Number(value);
if (Number.isNaN(n)) {
throw new DfdRuntimeError(`Se esperaba un número, se encontró "${value}"`);
}
return n;
}
/** `String(true)` da "true" — el pseudolenguaje escribe e imprime "Verdadero"/"Falso". */
function boolStr(b: boolean): string {
return b ? 'Verdadero' : 'Falso';
}
/** `ToFixed(r, i)` de Flowgorithm: TRUNCA a i decimales, no redondea — por eso no basta el `.toFixed()` nativo, que redondea. */
function toFixed(value: number, digits: number): string {
const d = Math.trunc(digits);
const factor = Math.pow(10, d);
return (Math.trunc(value * factor) / factor).toFixed(d);
}
function vecGet(v: (number | undefined)[], index: number): number {
const i = Math.trunc(index) - 1;
const value = v[i];
if (i < 0 || value === undefined) {
throw new DfdRuntimeError(`La posición ${index} del vector no tiene un valor asignado todavía`);
}
return value;
}
function vecSet(v: (number | undefined)[], index: number, value: number): void {
v[Math.trunc(index) - 1] = value;
}
function div(a: number, b: number): number {
if (b === 0) throw new DfdRuntimeError('División por cero');
return a / b;
}
function mod(a: number, b: number): number {
if (b === 0) throw new DfdRuntimeError('Módulo por cero');
// El `%` nativo de JS/TS coincide exacto con el del intérprete real
// (mismo motor) — a diferencia de Python, no hace falta ningún wrapper
// de signo, solo el chequeo de división por cero.
return a % b;
}
/**
* Punto de entrada del programa generado por freeDFDWeb.
*/
function main(): void {
let filas: number = 0;
let columnas: number = 0;
let huboProgreso: boolean = false;
let fila: number = 0;
let columna: number = 0;
let valor: number = 0;
let response_call: number = 0;
let marcadas: number = 0;
let sinSaber: number = 0;
let df: number = 0;
let dc: number = 0;
let vf: number = 0;
let vc: number = 0;
let faltan: number = 0;
console.log("Buscaminas — camino con deducción: SOLO usa lógica, nunca adivina.");
filas = 8;
columnas = 8;
console.log("Activar(" + "Buscaminas" + ")"); // Componente interactivo no disponible en el código exportado
Configurar(filas, columnas);
console.log("Primer click en el centro (4,4) — siempre seguro.");
Pisar(4, 4);
huboProgreso = true;
while (huboProgreso) {
huboProgreso = false;
const _forStart1 = 1;
const _forEnd1 = filas;
const _forStep1 = 1;
if (_forStep1 === 0) { throw new DfdRuntimeError("El incremento de \"para fila\" no puede ser 0"); }
for (fila = _forStart1; _forStep1 > 0 ? fila <= _forEnd1 : fila >= _forEnd1; fila += _forStep1) {
const _forStart2 = 1;
const _forEnd2 = columnas;
const _forStep2 = 1;
if (_forStep2 === 0) { throw new DfdRuntimeError("El incremento de \"para columna\" no puede ser 0"); }
for (columna = _forStart2; _forStep2 > 0 ? columna <= _forEnd2 : columna >= _forEnd2; columna += _forStep2) {
Consultar(fila, columna);
valor = response_call;
if (((valor !== "cubierto") && (valor !== "marcada"))) {
marcadas = 0;
sinSaber = 0;
const _forStart3 = -(1);
const _forEnd3 = 1;
const _forStep3 = 1;
if (_forStep3 === 0) { throw new DfdRuntimeError("El incremento de \"para df\" no puede ser 0"); }
for (df = _forStart3; _forStep3 > 0 ? df <= _forEnd3 : df >= _forEnd3; df += _forStep3) {
const _forStart4 = -(1);
const _forEnd4 = 1;
const _forStep4 = 1;
if (_forStep4 === 0) { throw new DfdRuntimeError("El incremento de \"para dc\" no puede ser 0"); }
for (dc = _forStart4; _forStep4 > 0 ? dc <= _forEnd4 : dc >= _forEnd4; dc += _forStep4) {
if (!((df === 0) && (dc === 0))) {
vf = (fila + df);
vc = (columna + dc);
if (((((vf >= 1) && (vf <= filas)) && (vc >= 1)) && (vc <= columnas))) {
Consultar(vf, vc);
if ((response_call === "marcada")) {
marcadas = (marcadas + 1);
} else {
if ((response_call === "cubierto")) {
sinSaber = (sinSaber + 1);
}
}
}
}
}
}
faltan = (valor - marcadas);
if (((sinSaber > 0) && (faltan === sinSaber))) {
const _forStart5 = -(1);
const _forEnd5 = 1;
const _forStep5 = 1;
if (_forStep5 === 0) { throw new DfdRuntimeError("El incremento de \"para df\" no puede ser 0"); }
for (df = _forStart5; _forStep5 > 0 ? df <= _forEnd5 : df >= _forEnd5; df += _forStep5) {
const _forStart6 = -(1);
const _forEnd6 = 1;
const _forStep6 = 1;
if (_forStep6 === 0) { throw new DfdRuntimeError("El incremento de \"para dc\" no puede ser 0"); }
for (dc = _forStart6; _forStep6 > 0 ? dc <= _forEnd6 : dc >= _forEnd6; dc += _forStep6) {
if (!((df === 0) && (dc === 0))) {
vf = (fila + df);
vc = (columna + dc);
if (((((vf >= 1) && (vf <= filas)) && (vc >= 1)) && (vc <= columnas))) {
Consultar(vf, vc);
if ((response_call === "cubierto")) {
Marcar(vf, vc);
huboProgreso = true;
}
}
}
}
}
} else {
if (((sinSaber > 0) && (faltan === 0))) {
const _forStart7 = -(1);
const _forEnd7 = 1;
const _forStep7 = 1;
if (_forStep7 === 0) { throw new DfdRuntimeError("El incremento de \"para df\" no puede ser 0"); }
for (df = _forStart7; _forStep7 > 0 ? df <= _forEnd7 : df >= _forEnd7; df += _forStep7) {
const _forStart8 = -(1);
const _forEnd8 = 1;
const _forStep8 = 1;
if (_forStep8 === 0) { throw new DfdRuntimeError("El incremento de \"para dc\" no puede ser 0"); }
for (dc = _forStart8; _forStep8 > 0 ? dc <= _forEnd8 : dc >= _forEnd8; dc += _forStep8) {
if (!((df === 0) && (dc === 0))) {
vf = (fila + df);
vc = (columna + dc);
if (((((vf >= 1) && (vf <= filas)) && (vc >= 1)) && (vc <= columnas))) {
Consultar(vf, vc);
if ((response_call === "cubierto")) {
Pisar(vf, vc);
huboProgreso = true;
}
}
}
}
}
}
}
}
}
}
}
console.log("Listo — resuelto 100% por lógica, sin adivinar ninguna celda.");
}
main();
Generato da freeDFDWeb dal diagramma qui sopra. È lo stesso file che scarica il pulsante Esporta dell’editor.
Apre e salva nei formati che usi già
Importa ed esporta PSeInt (.psc) e Flowgorithm (.fprg), e apre file .dfd del DFD classico. Tutto nel browser, senza installare nulla: funziona su Windows, Mac, Linux, Chromebook e cellulare.