28 lines
627 B
C#
28 lines
627 B
C#
|
namespace LearningChineseFixed
|
|||
|
{
|
|||
|
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
|
|||
|
}
|
|||
|
}
|