private void BuildGameData(Game[] games, Player[] players) { m_PlayerCount = players.Count(); Results = new double[games.Count()]; WhoPlayed = new double[games.Count()][]; for (int i = 0; i < games.Count(); i++) { Game g = games[i]; Results[i] = CsvParser.Conv(g.GoalDiff); WhoPlayed[i] = new double[m_PlayerCount]; for (int j = 0; j < m_PlayerCount; j++) { if (g.TA.Contains(players[j])) WhoPlayed[i][j] = 1; else if (g.TB.Contains(players[j])) WhoPlayed[i][j] = -1; else WhoPlayed[i][j] = 0; } } }