The solution (1 of 2) so people can use it to code it:
- farmer takes the goose, leaving fox and beans on river bank 1
- farmer comes back
- farmer takes the beans & brings the goose back, leaving the beans on river bank 2
- farmer takes the fox, leaving the goose on river bank 1
- farmer comes back
- farmer takes the goose, now everything is on river bank 2
In code:
There are the 2 conditions of things eat things. But there is also the 3rd condition that under the farmer things do not eat things.