The use of the hardcoded literals: 100 about line 97 aren't explained.
Would a final int be better then the name would self document

What is the logic about comparing: pileNum vs piles.size()...