function giveContentHard() {
    $(".box").on("click", function() {
        var r = $(this).attr("id");
        if (r.length === 4) {
            var k = r[3];
            boxArray[k-1].activated = true;
            $(this).text(boxArray[k-1].number);
            if (twoClicked === false && oneClicked === false) {
                $(this).css("color", "navy");
                oneClicked = true;
                cardOneNum = boxArray[k-1].number;
                firstIndex = k-1;
            } else if (twoClicked === false && oneClicked === true) {
                if (firstIndex !== k-1) {
                    $(this).css("color", "navy");
                    cardTwoNum = boxArray[k-1].number;
                    twoClicked = true;
                    sameNumber(firstIndex + 1, k);
                }    
            }
        } else {
            var k = r[3] + r[4];
            boxArray[k-1].activated = true;
            $(this).text(boxArray[k-1].number);
            if (twoClicked === false && oneClicked === false) {
                $(this).css("color", "navy");
                oneClicked = true;
                cardOneNum = boxArray[k-1].number;
                firstIndex = k-1;
            } else if (twoClicked === false && oneClicked === true) {
                if (firstIndex !== k-1) {
                    $(this).css("color", "navy");
                    cardTwoNum = boxArray[k-1].number;
                    twoClicked = true;
                    sameNumber(firstIndex + 1, k);
                }
            }
        }
    })
}
//Giving the text content to the boxes starts

Giving the text content to the boxes starts
Giving the text content to the boxes starts
function giveContentHard() {
    $(".box").on("click", function() {
        var r = $(this).attr("id");
        if (r.length === 4) {
            var k = r[3];
            boxArray[k-1].activated = true;
            $(this).text(boxArray[k-1].number);
            if (twoClicked === false && oneClicked === false) {
                $(this).css("color", "navy");
                oneClicked = true;
                cardOneNum = boxArray[k-1].number;
                firstIndex = k-1;
            } else if (twoClicked === false && oneClicked === true) {
                if (firstIndex !== k-1) {
                    $(this).css("color", "navy");
                    cardTwoNum = boxArray[k-1].number;
                    twoClicked = true;
                    sameNumber(firstIndex + 1, k);
                }    
            }
        } else {
            var k = r[3] + r[4];
            boxArray[k-1].activated = true;
            $(this).text(boxArray[k-1].number);
            if (twoClicked === false && oneClicked === false) {
                $(this).css("color", "navy");
                oneClicked = true;
                cardOneNum = boxArray[k-1].number;
                firstIndex = k-1;
            } else if (twoClicked === false && oneClicked === true) {
                if (firstIndex !== k-1) {
                    $(this).css("color", "navy");
                    cardTwoNum = boxArray[k-1].number;
                    twoClicked = true;
                    sameNumber(firstIndex + 1, k);
                }
            }
        }
    })
}
function giveContentHard ( ) { $ ( ".box" ) . on ( "click" , function ( ) { var r = $ ( this ) . attr ( "id" ) ; if ( r . length === 4 ) { var k = r [ 3 ] ; boxArray [ k - 1 ] . activated = true ; $ ( this ) . text ( boxArray [ k - 1 ] . number ) ; if ( twoClicked === false && oneClicked === false ) { $ ( this ) . css ( "color" , "navy" ) ; oneClicked = true ; cardOneNum = boxArray [ k - 1 ] . number ; firstIndex = k - 1 ; } else if ( twoClicked === false && oneClicked === true ) { if ( firstIndex !== k - 1 ) { $ ( this ) . css ( "color" , "navy" ) ; cardTwoNum = boxArray [ k - 1 ] . number ; twoClicked = true ; sameNumber ( firstIndex + 1 , k ) ; } } } else { var k = r [ 3 ] + r [ 4 ] ; boxArray [ k - 1 ] . activated = true ; $ ( this ) . text ( boxArray [ k - 1 ] . number ) ; if ( twoClicked === false && oneClicked === false ) { $ ( this ) . css ( "color" , "navy" ) ; oneClicked = true ; cardOneNum = boxArray [ k - 1 ] . number ; firstIndex = k - 1 ; } else if ( twoClicked === false && oneClicked === true ) { if ( firstIndex !== k - 1 ) { $ ( this ) . css ( "color" , "navy" ) ; cardTwoNum = boxArray [ k - 1 ] . number ; twoClicked = true ; sameNumber ( firstIndex + 1 , k ) ; } } } } ) }
Giving the text content to the boxes starts
Giving the text content to the boxes starts