Sometimes, it is convenient to not take all boxes in a chain. So, this implementation will incur nonoptimal play.