From 0634e5c21bbc28c24360f83d8cdf46e6892efbe7 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Mon, 31 Dec 2018 06:29:19 +0300 Subject: [PATCH] API --- OWTrack/Tracker.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/OWTrack/Tracker.cs b/OWTrack/Tracker.cs index 5bc5e5d..e653e77 100644 --- a/OWTrack/Tracker.cs +++ b/OWTrack/Tracker.cs @@ -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 Matches = new List(); /// - /// Start a new session with a starting Skill Rating + /// Start a new session /// public Session(int StartSR) { @@ -191,17 +191,29 @@ namespace OWTrack TotalMatches = 0; } + /// + /// Check if session does not have any matches + /// + /// Booelan public bool IsNewSession() { if (Matches.Count == 0) return true; else return false; } + /// + /// Get last match in Matchs list + /// + /// Match public Match GetLastMatch() { return Matches.Last(); } + /// + /// Add Match to list + /// + /// public void AddMatch(Match match) { match.LastMatchSR = this.Matches.Last().newSR;