Untested code warning.
Semi-pseudo code warning.
Firstly, rather than hide your evaluation amongst the control branches I'd evaluate and the state of the two axis early (shown below in left_right and forward_backward). It makes the code easier to read, test and maintain.
I think what you seem to be struggling with is checking when a value is between two limits, which is demonstrated below.
typedef left_right_t {LEFT, CENTRE_LR, RIGHT};
typedef forward_backward_t {FORWARD, CENTER_FB, BACKWARD};
void loop()
{
left_right_t : left_right;
forward_backward_t: forward_backward;
// Get X, Y (anareads etc...)
if (x < leftThreshhold)
left_right = LEFT;
else if ((x >= leftThreshhold ) && (x <= rightThreshhold))
left_right = CENTRE_LR;
else
left_right = RIGHT;
if (y < forwardThreshhold)
forward_backward = FORWARD;
else if ((y >= forwardThreshhold ) && (y <= backwardThreshhold))
forward_backward = CENTRE_FB;
else
forward_backward = BACKWARDS;
// Extinguish the centre LED
// Extinguish the forward and backward LED
switch (forward_backward)
{
case FORWARDS:
// Light the forwards LED
break;
case BACKWARDS:
// Light the backwards LED
break;
case CENTRE_FB:
// Light the centre LED
}
// Extinguish the left and centre LED .... DO NOT EXTINGUISH THE CENTRE!
switch (left_right)
{
case LEFT:
// Light the LEFT LED
break;
case RIGHT:
// Light the RIGHT LED
break;
case CENTRE_FB:
// Light the CENTRE LED
break;
}
}