function buildMatchups(pv_teams) {
  var matchups = [];

  for (var i = 0, max = pv_teams.length; i < max; i++) {
    var current = pv_teams[i];

    for (var ii = 0; ii < max; ii++) {
      if (current != pv_teams[ii]) {
        matchups.push({
          'game': (parseInt(i) + 1) + '_v_' + (parseInt(ii) + 1),
          'home': current.team,
          'visitor': pv_teams[ii].team,
          'winner': findWinner(current, pv_teams[ii])
        });
      }
    }
  }
  return matchups;
}
// build the matchups and execute the head to head competitions, returns the complete results for all matchups
build the matchups and execute the head to head competitions, returns the complete results for all matchups
build the matchups and execute the head to head competitions returns the complete results for all matchups
function buildMatchups(pv_teams) {
  var matchups = [];
  for (var i = 0, max = pv_teams.length; i < max; i++) {
    var current = pv_teams[i];
    for (var ii = 0; ii < max; ii++) {
      if (current != pv_teams[ii]) {
        matchups.push({
          'game': (parseInt(i) + 1) + '_v_' + (parseInt(ii) + 1),
          'home': current.team,
          'visitor': pv_teams[ii].team,
          'winner': findWinner(current, pv_teams[ii])
        });
      }
    }
  }
  return matchups;
}
function buildMatchups ( pv_teams ) { var matchups = [ ] ; for ( var i = 0 , max = pv_teams . length ; i < max ; i ++ ) { var current = pv_teams [ i ] ; for ( var ii = 0 ; ii < max ; ii ++ ) { if ( current != pv_teams [ ii ] ) { matchups . push ( { 'game' : ( parseInt ( i ) + 1 ) + '_v_' + ( parseInt ( ii ) + 1 ) , 'home' : current . team , 'visitor' : pv_teams [ ii ] . team , 'winner' : findWinner ( current , pv_teams [ ii ] ) } ) ; } } } return matchups ; }
build the matchups and execute the head to head competitions, returns the complete results for all matchups
build the matchups and execute the head to head competitions returns the complete results for all matchups