Fixed the slowest drivers windows and cleaned some of the code

This commit is contained in:
2023-05-30 09:38:51 +02:00
parent 6f36c829c2
commit 067e7233a0
16 changed files with 221 additions and 70 deletions
+3 -7
View File
@@ -1,8 +1,8 @@
/// Author : Maxime Rohmer
/// Date : 08/05/2023
/// Date : 30/05/2023
/// File : DriverTyresWindow.cs
/// Brief : Window containing infos about a driver's tyre
/// Version : 0.1
/// Version : Alpha 1.0
using System;
using System.Collections.Generic;
@@ -15,9 +15,6 @@ namespace Test_Merge
{
public class DriverTyresWindow:Window
{
private static Random rnd = new Random();
int seed = rnd.Next(0, 10000);
//Those are the colors I found but you can change them if they change in the future like in 2019
public static Color SOFT_TYRE_COLOR = Color.FromArgb(0xff, 0x00, 0x00);
public static Color MEDIUM_TYRE_COLOR = Color.FromArgb(0xf5, 0xbf, 0x00);
@@ -59,9 +56,8 @@ namespace Test_Merge
//We could not convert the number so its a letter so its 0 laps old
laps = 0;
}
//tyreZone.Save(Reader.DEBUG_DUMP_FOLDER + "Tyre" + type + "Laps" + laps + '#' + rnd.Next(0, 1000) + ".png");
//71 is the most laps an f1 race is ever going to have (mexico)
//71 is the most laps an f1 race is ever going to have (mexico) so any more would be considered as bad (and remember you cant go trough a full race without making at least one pitstop)
if (laps > 75)
laps = 0;