I am creating a snake game and need to target the last column of numbers so i can make logic to make the snake 'teleport' to the opposite side when it enters it. I can do that however im finding it tricky to target the last column of numbers. I need something like if snake[0] is equal to the numbers 19 to 399, the below code runs. Any clever math equations? ;)
else if (direction === 'up' && snake[0] === ??? {
newFrame()
}