fix issues in core
This commit is contained in:
@@ -39,10 +39,11 @@ export class RaceResultGenerator {
|
||||
|
||||
// Generate results
|
||||
const results: Result[] = [];
|
||||
for (let i = 0; i < driverPerformances.length; i++) {
|
||||
const { driverId } = driverPerformances[i];
|
||||
const position = i + 1;
|
||||
const startPosition = qualiPerformances.findIndex(p => p.driverId === driverId) + 1;
|
||||
for (const [index, performance] of driverPerformances.entries()) {
|
||||
const driverId = performance.driverId;
|
||||
const position = index + 1;
|
||||
const startPosition =
|
||||
qualiPerformances.findIndex(p => p.driverId === driverId) + 1;
|
||||
|
||||
// Generate realistic lap times (90-120 seconds for a lap)
|
||||
const baseLapTime = 90000 + Math.random() * 30000;
|
||||
|
||||
Reference in New Issue
Block a user