public static void main(String[] args) throws FileNotFoundException {
        short player1Wins = 0, i = 0, line = 0, h1Wins = 0;
        Hand h1 = new Hand(), h2 = new Hand();
        Scanner poker = new Scanner(new File("poker.txt"));
        //mixed logic; set new hands and compare them at the same time
        while (poker.hasNextLine()) {
            h1 = new Hand();
            h2 = new Hand();
            for (i = 0; i < 5 && poker.hasNext(); i++) {
                h1.addCard(poker.next());
            }
            for (i = 0; i < 5 && poker.hasNext(); i++) {
                h2.addCard(poker.next());
            }
            if (h1.highestRank() == 7) {
                System.out.println();
                h1.print();
            }
            if (h2.highestRank() == 7) {
                System.out.println();
                h2.print();
            }
            if (higherHand(h1, h2) == 1) {
                ++h1Wins;
            }
        }
        System.out.println(h1Wins);
    }