@Override
    public void compute(List<Card> holecards, List<Card> board, IHandRange range, int numPlayers) {
        initArrays();
        
        List<Card> boardCpy = new ArrayList(board);
        
        IHand ownCurrentHand = PokerFactory.buildHand(holecards, board);
        
        List<Card> c1Cand = new ArrayList(Card.values());
        for (Card c : holecards) {
            c1Cand.remove(c);
        }
        for (Card c : board) {
            c1Cand.remove(c);
        }
        
        List<Card> c2Cand = new ArrayList<>(c1Cand);
        
        for (Card c1 : c1Cand) {
            c2Cand.remove(c1);
            
            for (Card c2 : c2Cand) {
                List<Card> candCards = new ArrayList<>(2);
                candCards.add(c1);
                candCards.add(c2);
                
                IHand oppCurentHand = PokerFactory.buildHand(candCards, board);
                int curIdx = ownCurrentHand.compareTo(oppCurentHand) + 1;
                
                if (board.size() == 5) {
                    HPTotal[curIdx] += 1 * range.handWeight(candCards.get(0), candCards.get(1));
                }
                else {
                    List<Card> turnCand;
                    if (board.size() == 4) {
                        turnCand = new ArrayList<>(1);
                        turnCand.add(board.get(3));
                        if (boardCpy.size() == 4) {
                            boardCpy.remove(3);
                        }
                    }
                    else {
                        turnCand = new ArrayList<>(c1Cand);
                        turnCand.remove(c1);
                        turnCand.remove(c2);
                    }
                    List<Card> riverCand = new ArrayList<>(turnCand);
                    
                    for (Card turn : turnCand) {
                        riverCand.remove(turn);
                        
                        for (Card river : riverCand) {
                            
                            boardCpy.add(turn);
                            boardCpy.add(river);
                            
                            IHand ownFutureHand = PokerFactory.buildHand(holecards, boardCpy);
                            IHand oppFutureHand = PokerFactory.buildHand(candCards, boardCpy);
                            
                            int futIdx = ownFutureHand.compareTo(oppFutureHand) + 1;
                            HP[curIdx][futIdx] += 1 * range.handWeight(candCards.get(0), candCards.get(1));
                            HPTotal[curIdx] += 1 * range.handWeight(candCards.get(0), candCards.get(1));
                            
                            boardCpy.remove(3);
                            boardCpy.remove(3);
                        }
                    }
                }

            }
        }
        
        _numPl = numPlayers;
        calculatePotentials();

        //printData();
    }