Step 9: Programming
To those that want to change the patterns, pay attention to the sequenceLengths array. It should accurately represent the lengths of all other sequence arrays. If you want to add or remove any, adjust sequenceTotal to match, change sequenceLengths to the correct number of patterns, and add a "case" to findAndWriteStep().
Feel free to ask if I've been unclear in my comments or above.