Caruychen / 42Hive-Lem_in

Integrated smart ant colony transport system
2 stars 0 forks source link

0 ants #27

Closed crl-n closed 2 years ago

crl-n commented 2 years ago

Not sure how this case should be handled, but I think this might need a fix. Output with 0 ants looks like this at the moment.

./lem-in < testmap | cat -e
0$
3 2 2$
##start$
start 4 0$
##end$
end 4 6$
4 0 4$
1 4 2$
2 4 4$
5 8 2$
6 8 4$
start-1$
3-4$
2-4$
1-5$
6-5$
end-6$
1-2$
2-end$
3-start$
$
$
$
Caruychen commented 2 years ago

I think that case should be fine. It looks like it should be perfectly valid input. In any case, if it makes sense to still communicate "Insufficient ants" that would also be fine to implement.

Similarly, we could do something like that in maps where there is no valid path from source to sink.