Running tile swap function through JSLint