WIP: Major update #45

Closed
Hesham wants to merge 16 commits from develop-laptop into master
Showing only changes of commit 0634e5c21b - Show all commits

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;