public NetworkGameScreen(JFrame parent, NetworkGameType networkGameType) {
        this.networkGameType = networkGameType;
        this.parent = parent;
        this.width = parent.getContentPane().getWidth();
        this.height = parent.getContentPane().getHeight();
        super.setSize(width, height);
        this.width -= 10;
        super.setBackground(Color.BLACK);
        keys = new boolean[256];
        for (int i = 0; i < keys.length; i++)
            keys[i] = false;
        remoteKeys = new boolean[256];
        for (int i = 0; i < remoteKeys.length; i++)
            remoteKeys[i] = false;
        parent.addKeyListener(new MyKeyListener());
        parent.addMouseWheelListener(new MyMouseWheelListener());
        parent.addMouseListener(new MyMouseListener());
        parent.addMouseMotionListener(new MyMouseMotionListener());
        setFocusable(true);
        points = 0;
        _points = 0;
        movement = 10;
        scoreY = height/5;
        ball = getBall();
        ball.setSpeed((int) (height * BALL_SPEED)); // 6
        player = getPaddle();
        player.setSpeed((int)(height * PADDLE_SPEED)); // 7
        ai = getRemotePaddle();
        ai.setSpeed((int)(height * PADDLE_SPEED));
        url = Pong.class.getResource("pongLimit.wav");
        _url = Pong.class.getResource("pongScore.wav");
        clipContact = Applet.newAudioClip(url);
        clipScore = Applet.newAudioClip(_url);

        // ai and ball Timer
        aiTimer = new Timer(10, this);
        aiTimer.start();

        ballMovement = true;

    }