LearnChineseSimplified/CCharLearn/Classes/CCharStats.cs

28 lines
616 B
C#
Raw Normal View History

2023-07-07 19:41:56 +02:00
namespace CCharLearn
{
public class CCharStats
{
public CChar cchar { get; set; }
public int NumOfCorrects { get; set; } = 0;
public int NumOfWrongs { get; set; } = 0;
public int TotalAnswers { get => NumOfCorrects + NumOfWrongs; }
public float Accuracy
{
2023-07-06 20:44:52 +02:00
get
{
return (float)NumOfCorrects / (float)TotalAnswers;
}
}
public CCharStats(CChar cchar)
{
this.cchar = cchar;
}
}
public enum StatType
{
NumOfCorrects,
NumOfWrongs
}
}