2023-07-07 19:41:56 +02:00
|
|
|
|
namespace CCharLearn
|
2023-07-04 21:20:33 +02:00
|
|
|
|
{
|
|
|
|
|
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
|
2023-07-04 21:20:33 +02:00
|
|
|
|
{
|
|
|
|
|
return (float)NumOfCorrects / (float)TotalAnswers;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public CCharStats(CChar cchar)
|
|
|
|
|
{
|
|
|
|
|
this.cchar = cchar;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum StatType
|
|
|
|
|
{
|
|
|
|
|
NumOfCorrects,
|
|
|
|
|
NumOfWrongs
|
|
|
|
|
}
|
|
|
|
|
}
|