/// <summary> /// Adjusts team info from recorded match /// </summary> /// <param name="frc"></param> /// <param name="data"></param> public static void AdjustTeamInfo(FrcEvent frc, RecordedMatch data) { Team t = frc.LoadTeam(data.TrackedTeamID); t.Description = data.TeamDescription; t.Expectations = data.TeamExpectations; }
/// <summary> /// Additional loading after deserialization /// </summary> /// <param name="e">Event to load data from</param> public void PostJsonLoading(FrcEvent e) { TrackedTeam = e.LoadTeam(TrackedTeamID); if (TeamDescription == null || TeamDescription == "") { TeamDescription = TrackedTeam.Description; } if (TeamExpectations == null || TeamExpectations == "") { TeamExpectations = TrackedTeam.Expectations; } }
public Match MakeMatch() { Alliance red = new Alliance(frc.LoadTeam(RedA), frc.LoadTeam(RedB), frc.LoadTeam(RedC)); Alliance blue = new Alliance(frc.LoadTeam(BlueA), frc.LoadTeam(BlueB), frc.LoadTeam(BlueC)); return(new Match(MatchID, blue, red)); }
public void PostJsonLoading(FrcEvent e) { Team = e.LoadTeam(TeamID); Match = e.LoadMatch(MatchID); }
/// <summary> /// Completes any references left out when loaded by JSON /// </summary> /// <param name="e"></param> public void PostJsonLoading(FrcEvent e) { Event = e; Team = e.LoadTeam(TeamID); }