private boolean changeBallDirection(Character wallDirection){
        switch (wallDirection){
            case 'u':
                if (ball.getySpeed() > 0){
                    ball.setSpeed(ball.getxSpeed(), -ball.getySpeed());
                    return true;
                }
                break;
            case 'd':
                if (ball.getySpeed() < 0){
                    ball.setSpeed(ball.getxSpeed(), -ball.getySpeed());
                    return true;
                }
                break;
            case 'l':
                if (ball.getxSpeed() < 0){
                    ball.setSpeed(-ball.getxSpeed(), ball.getySpeed());
                    return true;
                }
                break;
            case 'r':
                if(ball.getxSpeed() > 0){
                    ball.setSpeed(-ball.getxSpeed(), ball.getySpeed());
                    return true;
                }
                break;
            case 'c': //corner
                ball.setSpeed(-ball.getxSpeed(), -ball.getySpeed());
                return true;
            default:
                break;
        }
        return false;
    }