I don't know if it's on purpose, but you start counting from 20 to PatternCount-1 so you're skipping the first 20 tiles. But that may be your intention.

Else I would say that your code look allright. Except you're drawing the same tile all the time, so there's no use for i right now.

An image would help.