From 8902910406fe11ec55932be70d1df508f61c083d Mon Sep 17 00:00:00 2001 From: Paulo Custodio Date: Tue, 26 Jan 2021 21:44:53 +0000 Subject: merged --- challenge-096/paulo-custodio/basic/ch-2.bas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'challenge-096') diff --git a/challenge-096/paulo-custodio/basic/ch-2.bas b/challenge-096/paulo-custodio/basic/ch-2.bas index 8d88019f32..669ab1bebf 100644 --- a/challenge-096/paulo-custodio/basic/ch-2.bas +++ b/challenge-096/paulo-custodio/basic/ch-2.bas @@ -84,7 +84,9 @@ sub wag_fish_dist(a as string, b as string) ' search shortest path in priority SE, E, S if i < len(a) and j < len(b) then dr = SE: delta = d(i+1,j+1) - d(i,j) - min_dr = dr: min_delta = delta + if delta < min_delta then + min_dr = dr: min_delta = delta + end if end if if j < len(b) then dr = E: delta = d(i,j+1) - d(i,j) -- cgit