public void run(){
        String[] dataFragments;
        String code;
        String ballX;
        String ballY;
        String padTop;
        String padBottom;
        String scoreL;
        String scoreR;
        String dataReceived;
        try {
            while(true){
                dataReceived = serverIn.readLine();
                dataFragments = dataReceived.split(",");
                code = dataFragments[0];
                if(dataFragments != null) {
                    if (code.equals("00")) {
                        System.out.println("Received Ball info");

                    } else if (code.equals("01") || code.equals("10")) {
                        if (code.equals("01")) {
                            padTop = dataFragments[1];
                            topPadX = Integer.parseInt(padTop);
                        } else if (code.equals("10")){
                            padBottom = dataFragments[1];
                            bottomPadX = Integer.parseInt(padBottom);
                        }
                    } else if (code.equals("11")) {
                        System.out.println("Received Score info");
                        scoreL = dataFragments[1];
                        scoreR = dataFragments[2];
                    }
                }else{
                    System.out.print("Error, bad formed data");
                }
            }
        }
        catch (IOException ioe) {
            System.err.println("Error, caused by: " + ioe);
            ioe.printStackTrace();
            System.exit(0);
        }
    }