Levels are generated randomly. The number of black pieces grows until level 10, then randomly fluctuates.