0.2.0
This release adds the Bridge and Torch problem to the application.
These two commands are equivalent:
cargo run -- bridge-and-torch
cargo run -- bridge-and-torch --bridge 2 --torch 15 --person 1 --person 2 --person 5 --person 8
Running them prints a solution like the following:
At 0 minutes: [<1>, <2>, <5>, <8>] on the left, nobody on the right (torch: 15 minutes)
→ [<1>, <2>] cross forward, taking 2 minutes
At 2 minutes: [<5>, <8>] on the left, [<1>, <2>] on the right (torch: 13 minutes)
← [<1>] returns, taking 1 minute
At 3 minutes: [<5>, <8>, <1>] on the left, [<2>] on the right (torch: 12 minutes)
→ [<5>, <8>] cross forward, taking 8 minutes
At 11 minutes: [<1>] on the left, [<2>, <5>, <8>] on the right (torch: 4 minutes)
← [<2>] returns, taking 2 minutes
At 13 minutes: [<1>, <2>] on the left, [<5>, <8>] on the right (torch: 2 minutes)
→ [<1>, <2>] cross forward, taking 2 minutes
At 15 minutes: nobody on the left, [<5>, <8>, <1>, <2>] on the right (torch: 0 minutes)