private bool CheckNextStacks(ContainerStack nextStack, ContainerStack secondNextStack) { if (nextStack == null || secondNextStack == null) { return(true); } if (nextStack.IsTopContainerValuable() && nextStack.GetContainers().Count > secondNextStack.GetContainers().Count) { return(true); } return(false); }
private bool CanNormalContainerBePlaced(int containerAmount, ContainerStack previousStack, ContainerStack currentStack, ContainerStack nextStack, ContainerStack secondNextStack) { if (containerAmount < previousStack.GetContainers().Count) { return(CheckNextStacks(nextStack, secondNextStack)); } else if (currentStack.IsTopContainerValuable()) { return(true); } else { return(false); } }