public FSOnlineGame(MainFrame frame, int paneWidth, int paneHeight) throws ScriptException, NoSuchMethodException {
        super(frame, paneWidth, paneHeight);        
        setBackgroundImage(Color.green, Main.getImageResource("bgGame.jpg"));
        
        _gameManager = Main.getGameManager();
        _sessionManager = Main.getSessionManager();
        
        Point rightDeckZoomPosition = new Point(paneWidth / 2, paneHeight - 100);
        Point leftDeckZoomPosition = new Point(0, paneHeight - 100);
        Dimension deckZoomDimension = new Dimension(paneWidth / 2, 100);
        
        DAction endTurnAction = new EndTurnAction();
        Font buttonFont = new Font("SansSerif", Font.BOLD, 20);
        Color buttonFontColor = Color.white;
        Color buttonColor = new Color(150, 0, 0);
        Color buttonHoverColor = new Color(150, 50, 50);
        Dimension buttonDimension = new Dimension(100, 50);
        Point quitButtonPosition = new Point(10, 10);
        Point endTurnButtonPosition = 
                new Point(paneWidth - buttonDimension.width - 10, 10);
        
         _rightSelect = -1;
        _leftSelect = -1;
        
        _dDeckFont = new Font("SansSerif", Font.BOLD, 15);
        Font _dDeckZoomFont = new Font("SansSerif", Font.BOLD, 15);
        
        _dDecks = new ArrayList<>();
        
        _gameManager.setFrameState(this);
        
        _onlineIn = Main.getOnlineInStream();
        _onlineOut = Main.getOnlineOutStream();
        
        _gameManager.startGame();
        _gameManager.startTurn();
        _gameManager.setSessionManager(_sessionManager);
        _gameManager.setOnlineout(_onlineOut);
        
        ArrayList<DDeck> dDecks =
                _gameManager.getDDecks(_gameManager.getActivePlayer());
        
        for (DDeck dDeck : dDecks) {
            dDeck.setAction(new DDeckAction(dDeck));
            dDeck.setFont(_dDeckFont);
            addComponent(dDeck);
            _dDecks.add(dDeck);
        }
        
        _dCompDraw = new DComponentDrawer();
        
        _playerLabel = new DLabel(_gameManager.getActivePlayer().getName() + "'s Turn");
        _playerLabel.setFont(new Font("SansSerif", Font.BOLD, 50), Color.ORANGE);
        _playerLabel.setAlignment(DLabel.centerAlign);
        _playerLabel.setPosition(new Point(paneWidth / 2, 50));
        
        _rightDeckZoom = new DDeckZoom();
        _rightDeckZoom.setPosition(rightDeckZoomPosition);
        _rightDeckZoom.setDimensions(deckZoomDimension);
        _rightDeckZoom.setBackgroundColor(rightDeckZoomColor);
        _rightDeckZoom.setGameManager(_gameManager);
        _rightDeckZoom.setAction(new RightZoomAction(_rightDeckZoom));
        _rightDeckZoom.setFont(_dDeckZoomFont);
        _rightDeckZoom.setDCompDraw(_dCompDraw);
        
        _leftDeckZoom = new DDeckZoom();
        _leftDeckZoom.setPosition(leftDeckZoomPosition);
        _leftDeckZoom.setDimensions(deckZoomDimension);
        _leftDeckZoom.setBackgroundColor(leftDeckZoomColor);
        _leftDeckZoom.setGameManager(_gameManager);
        _leftDeckZoom.setAction(new LeftZoomAction(_leftDeckZoom));
        _leftDeckZoom.setFont(_dDeckZoomFont);
        _leftDeckZoom.setDCompDraw(_dCompDraw);
        
        _endTurnButton = new DButton("End Turn");
        _endTurnButton.setBackground(buttonColor);
        _endTurnButton.setHoverBackground(buttonHoverColor);
        _endTurnButton.setPosition(endTurnButtonPosition);
        _endTurnButton.setDimensions(buttonDimension);
        _endTurnButton.setFont(buttonFont, buttonFontColor);
        _endTurnButton.setAction(endTurnAction);
        _endTurnButton.setEnabled(_gameManager.canEndTurn());
        
        _quitButton = new DButton("Quit");
        _quitButton.setBackground(buttonColor);
        _quitButton.setHoverBackground(buttonHoverColor);
        _quitButton.setPosition(quitButtonPosition);
        _quitButton.setDimensions(buttonDimension);
        _quitButton.setFont(buttonFont, buttonFontColor);
        _quitButton.setAction(new QuitAction());
        
        addComponent(_playerLabel);
        addComponent(_leftDeckZoom);
        addComponent(_rightDeckZoom);
        addComponent(_endTurnButton);
        addComponent(_quitButton);
        addComponent(_dCompDraw);
        
        Player player = _gameManager.getActivePlayer();
        if (player.isLocal()) {
            if (player instanceof AIPlayer) {
                AIPlayer aiPlayer = (AIPlayer)player;
                aiPlayer.playTurn(_gameManager);
                endTurnAction.run();
            }
        } else {
            try {
                String input;            
                do {
                    input = _onlineIn.readLine();
                    if (input.equals("moveCard")) {
                        break;
                    }
                    
                    int cardID = Integer.parseInt(_onlineIn.readLine());
                    int deckID = Integer.parseInt(_onlineIn.readLine());
                    int deckPos = Integer.parseInt(_onlineIn.readLine());
                    
                    _gameManager.uncheckedMoveCard(_gameManager.getCard(cardID), _gameManager.getDeck(deckID), deckPos);

                } while(true);
                
                input = _onlineIn.readLine();
                if (input.equals("endTurn")) {
                    endTurnAction.run();
                }                
                
            } catch (IOException ex) {
                JOptionPane.showMessageDialog(null, ex.getMessage(),
                        "Game error", JOptionPane.ERROR_MESSAGE);
                _frame.setFrameState(new FSMainMenu(_frame, _paneWidth, _paneHeight));
            }            
        }
    }