private void robotTurn() throws Exception {

        if(session.getAviableMatches() <= 0){
            //session.getCurrentUser().resetCount(0);
            return;
        }
        else if(session.getAviableMatches() <= 10){
            this.takeMatches(session.getAviableMatches());
        }
        else{
            Random r = new Random();
            Integer m = Math.abs(r.nextInt(9)+1);
            this.takeMatches(m);
            System.out.println("select matches=" + m);
        }
        if(session.getNextUser().getType().equals("robot")){
            session.changeCurrentUser();
            Integer available = session.getAviableMatches();
            session.getCurrentUser().resetCount(available);
            this.robotTurn();
        }
        else if(session.getAviableMatches() > 0){
            session.changeCurrentUser();
        }
    }