Is there any easier way of checking one variables value against several others? Currently I'm using code like this:
if(a[i] == a[i-13] || a[i] == a[i+13] || a[i] == a[i-1] || a[i] == a[i+1]){
//my code
}
Now, is there a shorter way to do this? I know I can use a switch, but then I'd have to write my function several times. Is there an easier way of doing this?