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