function LineupData(data) {
    var lineupData = {};
    
    lineupData._data = data;
    
    lineupData.getLineupStats = function(team, key) {
        for (var i = 0; i < 2; i++) {
            if (this._data[i].team == team) {
                return this._data[i].data[key];        
            }
        }
        
    }
    
    lineupData.getLineupData = function(gameupdate) {
        var onCourtPlayers = gameupdate.getOnCourtPlayers();
        var key0 = this.getLineupKey(onCourtPlayers[0]);
        var stats0 = this.getLineupStats("Oklahoma City Thunder", key0)
        
        var key1 = this.getLineupKey(onCourtPlayers[1]);
        var stats1 = this.getLineupStats("Golden State Warriors", key1)
        return [stats0, stats1];
    }
    
    lineupData.getLineupKey = function(players) {
        var formatted_player_arr = []
        for (var key in players) {
            formatted_player_arr.push([players[key].lastName, players[key].firstName].join(','))
        }
        formatted_player_arr = formatted_player_arr.sort()
        return formatted_player_arr.join(' - ')
    }
    
    return lineupData;
}