storing position, color, and nrOf previous color, for every color switch. These are now stored in a 1D array but will be refactored to a 4xN matrix
locate qr code, refactored a bit. Should do both vertically and horizontally