public Move[] getPossibleMoves(int x, int y, boolean hasFood){
    int xc = x + xCenter;
    int yc = y + yCenter;

    ArrayList<Move> retval = new ArrayList<Move>();

    if(validMove(Action.move(Direction.NORTH), x, y, hasFood)){
      retval.add(new Move(Action.move(Direction.NORTH), 
                          new Position(x, y-1)));
    }
    if(validMove(Action.move(Direction.EAST), x, y, hasFood)){
      retval.add(new Move(Action.move(Direction.EAST), 
                          new Position(x+1, y)));
    }
    if(validMove(Action.move(Direction.SOUTH), x, y, hasFood)){
      retval.add(new Move(Action.move(Direction.SOUTH), 
                          new Position(x, y+1)));
    }
    if(validMove(Action.move(Direction.WEST), x, y, hasFood)){
      retval.add(new Move(Action.move(Direction.WEST), 
                          new Position(x-1, y)));
    }

    return retval.toArray(new Move[0]);
  }