28 lines
616 B
C#
28 lines
616 B
C#
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
|
|
{
|
|
get
|
|
{
|
|
return (float)NumOfCorrects / (float)TotalAnswers;
|
|
}
|
|
}
|
|
|
|
public CCharStats(CChar cchar)
|
|
{
|
|
this.cchar = cchar;
|
|
}
|
|
}
|
|
|
|
public enum StatType
|
|
{
|
|
NumOfCorrects,
|
|
NumOfWrongs
|
|
}
|
|
} |