Fixed logical bug in an if-condition for checking which axis the snake is on