Skip to content

Commit

Permalink
a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Skydev0h committed Jan 5, 2024
1 parent 648ba92 commit 3a55101
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions contracts/task4.fc
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,20 @@ const int infinity_price = (1 << infinity_shift) - 1;
int x = 0;
repeat(lx) {
int c = t.t:(x);
if (c == "S"u) { Sx = x; Sy = y; }
int ctp = tile_prices.t:(c) + ((abs(Ex - x) + abs(Ey - y)) << astar_dist_shift);
if (c == "E"u) { ctp = ctp | fin_bit;}
;; if (c == "E"u) { ctp = ctp | fin_bit;}
r~t:+( ctp );
if (c == "S"u) { Sx = x; Sy = y; }
x += 1;
}
tp~t:+(r);
y += 1;
}

tp~t:=(tp.t:(Ey).t:=(final_tile_price | fin_bit, Ex), Ey);

tuple atp = empty_tuple();
tuple row = empty_tuple();
tuple row = atp; ;; empty_tuple();
repeat(lx) { row~t:+(infinity_price); }
repeat(ly) { atp~t:+(row); }
atp~t:=(atp.t:(Sy).t:=(0, Sx), Sy);
Expand Down

0 comments on commit 3a55101

Please sign in to comment.