public bool canMoveGap(Action where) {
bool retVal = true;
int absPos = getPositionOf(0);
if (where.Equals(LEFT))
retVal = (getYCoord(absPos) != 0);
else if (where.Equals(RIGHT))
retVal = (getYCoord(absPos) != 2);
else if (where.Equals(UP))
retVal = (getXCoord(absPos) != 0);
else if (where.Equals(DOWN))
retVal = (getXCoord(absPos) != 2);
return retVal;
}