This commit is contained in:
HeshamTB 2018-12-31 06:29:19 +03:00
parent b8298a2c4c
commit 0634e5c21b

View File

@ -174,7 +174,7 @@ namespace OWTrack
class Session
{
public int wins, losses;
public int wins, losses = 0;
public int TotalMatches;
public int SkillChange;
public int StartSR;
@ -182,7 +182,7 @@ namespace OWTrack
public List<Match> Matches = new List<Match>();
/// <summary>
/// Start a new session with a starting Skill Rating
/// Start a new session
///</summary>
public Session(int StartSR)
{
@ -191,17 +191,29 @@ namespace OWTrack
TotalMatches = 0;
}
/// <summary>
/// Check if session does not have any matches
/// </summary>
/// <returns>Booelan</returns>
public bool IsNewSession()
{
if (Matches.Count == 0) return true;
else return false;
}
/// <summary>
/// Get last match in Matchs list
/// </summary>
/// <returns>Match</returns>
public Match GetLastMatch()
{
return Matches.Last();
}
/// <summary>
/// Add Match to list
/// </summary>
/// <param name="match"></param>
public void AddMatch(Match match)
{
match.LastMatchSR = this.Matches.Last().newSR;