function generateAWinner(a, b) {
    for (var i = 0; i < 3; i++) {
        fight(a, b);
    }
    if (acard > bcard) {
        winner = a.name;
        winnerimage = a.image;
        winnermethod = cleanScore(scores);
    } else if (bcard > acard) {
        winner = b.name;
        winnerimage = b.image;
        winnermethod = cleanScore(scores);
    } else {
        winner = a.name;
        winnerimage = a.image;
        winnermethod = cleanScore(scores);
    }
}
//the function which actually determines the winner
the function which actually determines the winner
the function which actually determines the winner
function generateAWinner(a, b) {
    for (var i = 0; i < 3; i++) {
        fight(a, b);
    }
    if (acard > bcard) {
        winner = a.name;
        winnerimage = a.image;
        winnermethod = cleanScore(scores);
    } else if (bcard > acard) {
        winner = b.name;
        winnerimage = b.image;
        winnermethod = cleanScore(scores);
    } else {
        winner = a.name;
        winnerimage = a.image;
        winnermethod = cleanScore(scores);
    }
}
function generateAWinner ( a , b ) { for ( var i = 0 ; i < 3 ; i ++ ) { fight ( a , b ) ; } if ( acard > bcard ) { winner = a . name ; winnerimage = a . image ; winnermethod = cleanScore ( scores ) ; } else if ( bcard > acard ) { winner = b . name ; winnerimage = b . image ; winnermethod = cleanScore ( scores ) ; } else { winner = a . name ; winnerimage = a . image ; winnermethod = cleanScore ( scores ) ; } }
the function which actually determines the winner
the function which actually determines the winner