public ArrayList<Integer> findPlayerPieces(int player) {
        ArrayList<Integer> playerPieces = new ArrayList<Integer>();
        for (int i = 0; i < boardArray.length; i++)
            if (boardArray[i] == player) playerPieces.add(i);
        return playerPieces;
    }