Should probably make `stroke.length % 2` a function to reduce repetition and clarify intent.