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

Mise au point des formules de calcul de l'effort.

parent 6288e2b4
Branches
No related merge requests found
......@@ -127,7 +127,7 @@
//
// pnlCompetence
//
this.pnlCompetence.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.pnlCompetence.BackColor = System.Drawing.Color.Blue;
this.pnlCompetence.Location = new System.Drawing.Point(3, 4);
this.pnlCompetence.Name = "pnlCompetence";
this.pnlCompetence.Size = new System.Drawing.Size(58, 18);
......@@ -155,15 +155,15 @@
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(3, 189);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(98, 13);
this.label4.Size = new System.Drawing.Size(104, 13);
this.label4.TabIndex = 9;
this.label4.Text = "Moyenne général : ";
this.label4.Text = "Moyenne générale : ";
this.label4.Click += new System.EventHandler(this.InterfaceInfoEleve_Click);
//
// lblMoyenne
//
this.lblMoyenne.AutoSize = true;
this.lblMoyenne.Location = new System.Drawing.Point(96, 189);
this.lblMoyenne.Location = new System.Drawing.Point(107, 189);
this.lblMoyenne.Name = "lblMoyenne";
this.lblMoyenne.Size = new System.Drawing.Size(35, 13);
this.lblMoyenne.TabIndex = 10;
......
......@@ -106,18 +106,17 @@ namespace psychorientation
public void Progression(double typeEducation)
{
double t_competence = competence;
this.competence += this.effort * 0.1 * (1 - (t_competence * 0.1)) * (1.0 / 12);
if (competence < 0) { competence = 0; }
else if (competence > 10) { competence = 10; }
if (t_competence != typeEducation)
this.effort += Math.Min(Math.Max(((1 / Math.Abs(t_competence - typeEducation)) - (1.0 / 3)) * 3, -1), 1) * 1;
if (competence != typeEducation)
this.effort += Math.Min(Math.Max(((1 / Math.Abs(competence - typeEducation)) - (1.0 / 3)) * 3, -1), 1);
else
this.effort += 0.5;
this.effort += 1;
if (effort < 0) { effort = 0; }
else if (effort > 10) { effort = 10; }
this.competence += (((effort * 0.1) - 0.3) * (1.2 - (competence * 0.1)));
if (competence < 0) { competence = 0; }
else if (competence > 10) { competence = 10; }
}
......@@ -126,7 +125,6 @@ namespace psychorientation
double note = CalculerNote();
double note_convenable = 10 + (competence - 5);
/*
if (effort > 5)
{
if (note >= note_convenable)
......@@ -146,25 +144,13 @@ namespace psychorientation
}
else
{
if (competence > 5)
{
effort += 0.25;
}
else
{
effort -= 0.25;
}
effort += 0.25;
}
}*/
/*
if (note_convenable <= note)
{
this.effort -= 0.5*this.competence*0.3;
}
if (effort < 0) { effort = 0; }
else if (effort > 10) { effort = 10; }
*/
Note n = new Note(nom, note, this.competence, this.effort);
this.listeNotes.Add(n);
}
......
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