public ChangeUserButton(){
        addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                if (!active) return;
                try {
                    Integer available = session.getAviableMatches();

                    setText("передать ход");

                    if(!is_new) session.changeCurrentUser();
                    else is_new = false;

                    session.getCurrentUser().resetCount(available);
                    if (session.getCurrentUser().getType().equals("robot")) {
                        robotTurn();
                    }
                    repaint();
                } catch (Exception e1) {
                    e1.printStackTrace();
                }
                System.out.println("available matches=" + session.getAviableMatches());
            }
        });
        Integer x = GameConfig.windowXSize/2-50;
        setBounds(x, 40, 100, 20);
        setMargin(new Insets(3, 2, 3, 2));
        setBorderPainted(false);
        setText("Начать");
    }