Skip to content
Snippets Groups Projects
Commit b6780a94 authored by Antoine Félix's avatar Antoine Félix
Browse files

Modification du calcul de progression.

parent 6cdb3fa4
No related merge requests found
...@@ -111,27 +111,16 @@ namespace psychorientation ...@@ -111,27 +111,16 @@ namespace psychorientation
if (competence < 0) { competence = 0; } if (competence < 0) { competence = 0; }
else if (competence > 10) { competence = 10; } else if (competence > 10) { competence = 10; }
var diff = Math.Abs(competence - effort); if (t_competence != typeEducation)
if (diff < 3.0) this.effort += Math.Min(Math.Max(((1 / Math.Abs(t_competence - typeEducation)) - (1.0 / 3)) * 3, -1), 1) * 0.5;
{
this.effort += Math.Pow(0.5, diff + 1);
}
else else
{ this.effort += 0.5;
if (diff >= 6)
{
this.effort -= 0.5;
}
else
{
this.effort -= 0.125 * (diff - 3);
}
}
if (effort < 0) { effort = 0; } if (effort < 0) { effort = 0; }
else if (effort > 10) { effort = 10; } else if (effort > 10) { effort = 10; }
} }
public void AjouterNote(string nom) public void AjouterNote(string nom)
{ {
Note n = new Note(nom, CalculerNote(), this.competence, this.effort); Note n = new Note(nom, CalculerNote(), this.competence, this.effort);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment