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

Mise en place des variations des compétences et des efforts de chaque élève.

parent f32df4e7
Branches
No related merge requests found
...@@ -21,7 +21,6 @@ namespace psychorientation ...@@ -21,7 +21,6 @@ namespace psychorientation
InitializeComponent(); InitializeComponent();
} }
private void Form1_Load(object sender, EventArgs e) private void Form1_Load(object sender, EventArgs e)
{ {
lbl_date.Text = libelle.Mois(moisActuel % 12) + " " + libelle.Niveau(anneeActuelle); lbl_date.Text = libelle.Mois(moisActuel % 12) + " " + libelle.Niveau(anneeActuelle);
...@@ -53,11 +52,13 @@ namespace psychorientation ...@@ -53,11 +52,13 @@ namespace psychorientation
break; break;
case 42: // Fin de la 3ème année : Debut Juillet. case 42: // Fin de la 3ème année : Debut Juillet.
// Fin de la partie. // Fin de la partie.
Message m_fin = new Message(-1, "Vous avez fini la phase bêta de ce jeu !\n" + Message m_fin = new Message(
"Bravo à vous et n'hésitez pas à essayer à nouveau pour " + -1,
"améliorer votre compréhension du monde extérieur.", "Vous avez fini la phase bêta de ce jeu !\n" +
"Félicitations", "Bravo à vous et n'hésitez pas à essayer à nouveau pour " +
TypeMessage.INFORMATION "améliorer votre compréhension du monde extérieur.",
"Félicitations",
TypeMessage.INFORMATION
); );
m_fin.ShowDialog(); m_fin.ShowDialog();
Close(); Close();
......
...@@ -21,22 +21,22 @@ namespace psychorientation ...@@ -21,22 +21,22 @@ namespace psychorientation
this.effort = effort; this.effort = effort;
} }
public string getNom() public string GetNom()
{ {
return this.nom; return this.nom;
} }
public double getNote() public double GetNote()
{ {
return this.note; return this.note;
} }
public double getCompetence() public double GetCompetence()
{ {
return this.competence; return this.competence;
} }
public double getEffort() public double GetEffort()
{ {
return this.effort; return this.effort;
} }
......
...@@ -104,14 +104,60 @@ namespace psychorientation ...@@ -104,14 +104,60 @@ namespace psychorientation
public void Progression(double typeEducation) public void Progression(double typeEducation)
{ {
this.competence += (this.effort - typeEducation) / competence * 2; double t_competence = competence;
this.effort += (this.effort - typeEducation) / competence * 2; this.competence += (this.effort - typeEducation) * (1 - (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) * 0.5;
else
this.effort += 0.5;
if (effort < 0) { effort = 0; }
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);
this.listeNotes.Add(n); this.listeNotes.Add(n);
double note = n.GetNote();
double note_convenable = 10 + (competence - 5);
if (effort > 5)
{
if (note > note_convenable)
{
effort += 0.25;
}
else
{
effort -= 0.5;
}
}
else
{
if (note > note_convenable)
{
effort -= 0.25;
}
else
{
if(competence > 5)
{
effort += 1;
}
else
{
effort -= 0.5;
}
}
}
if (effort < 0) { effort = 0; }
else if (effort > 10) { effort = 10; }
} }
private double CalculerNote() private double CalculerNote()
......
...@@ -125,5 +125,8 @@ ...@@ -125,5 +125,8 @@
<ItemGroup> <ItemGroup>
<None Include="Resources\sortir.png" /> <None Include="Resources\sortir.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="Resources\grp.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>
\ No newline at end of file
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