public void move(Input input, Rectangle[] walls, int delta){

        Rectangle attempt = container;

        if (input.isKeyDown(Input.KEY_UP))
        {
            sprite = up;
            attempt.setLocation(absolutex,absolutey - delta * 0.1f);
            if (!collision(attempt,walls)){
                absolutey -= delta * 0.1f;
                //move(0,-delta * 0.1f);
                container.setLocation(absolutex , absolutey);
                sprite.update(delta);
            }

        }
        else if (input.isKeyDown(Input.KEY_DOWN))
        {
            sprite = down;            
            attempt.setLocation(absolutex,absolutey + delta * 0.1f);
            if (!collision(attempt,walls)){
                absolutey += delta * 0.1f;
                //move(0,delta * 0.1f);
                container.setLocation(absolutex, absolutey);
                sprite.update(delta);
            }


        }
        else if (input.isKeyDown(Input.KEY_LEFT))
        {
            sprite = left;            
            attempt.setLocation(absolutex - delta * 0.1f,absolutey);
            if (!collision(attempt,walls)){
                absolutex -= delta * 0.1f;
                //move(-delta * 0.1f,0);
                container.setLocation(absolutex, absolutey);
                sprite.update(delta);
            }
        }
        else if (input.isKeyDown(Input.KEY_RIGHT))
        {
            sprite = right;            
            attempt.setLocation(absolutex + delta * 0.1f,absolutey);
            if (!collision(attempt,walls)){
                absolutex += delta * 0.1f;
                //move(delta * 0.1f,0);
                container.setLocation(absolutex, absolutey);
                sprite.update(delta);
            }
        }
    }