Total matches functions
This commit is contained in:
parent
470e2399f1
commit
7f10e36e25
@ -37,7 +37,21 @@ namespace OWTrack
|
|||||||
public void rediceLoss() => losses--;
|
public void rediceLoss() => losses--;
|
||||||
public int GetWins() { return wins; }
|
public int GetWins() { return wins; }
|
||||||
public int GetLosses() { return losses; }
|
public int GetLosses() { return losses; }
|
||||||
public int GetTotalMatches() { return wins + losses; }
|
public int GetTotalMatches()
|
||||||
|
{
|
||||||
|
int number = 0;
|
||||||
|
foreach (var session in sessions)
|
||||||
|
{
|
||||||
|
number += session.TotalMatches;
|
||||||
|
}
|
||||||
|
return number;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int GetCurrentSessionMatches()
|
||||||
|
{
|
||||||
|
return sessions.Last().TotalMatches;
|
||||||
|
}
|
||||||
|
|
||||||
public void setNewSR(int SR) { newSR = SR; }
|
public void setNewSR(int SR) { newSR = SR; }
|
||||||
public int srDiff() { return newSR - startSR; }
|
public int srDiff() { return newSR - startSR; }
|
||||||
public Settings settings = new Settings();
|
public Settings settings = new Settings();
|
||||||
@ -160,6 +174,7 @@ namespace OWTrack
|
|||||||
{
|
{
|
||||||
this.StartSR = StartSR;
|
this.StartSR = StartSR;
|
||||||
date = DateTime.Now.Date;
|
date = DateTime.Now.Date;
|
||||||
|
TotalMatches = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsNewSession()
|
public bool IsNewSession()
|
||||||
@ -176,6 +191,7 @@ namespace OWTrack
|
|||||||
public void AddMatch(Match match)
|
public void AddMatch(Match match)
|
||||||
{
|
{
|
||||||
this.Matches.Add(match);
|
this.Matches.Add(match);
|
||||||
|
this.TotalMatches = Matches.Count();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user