Posts

Showing posts with the label text field delegate

Treehouse Intermediate Course - Part 16 (Delegation 3)

Image
Here we are now! So, first of all, I've spent several hours tinkering with the F1 Sim Playground and made some major breakthroughs! Yesterday, I realised that the main issue was that the random value was being added to ALL the drivers' distanceTravelled. This basically negated the whole point of the random element. Essentially, the maxSpeed would determine the whole race! So I came up with a solution...eventually! And I am so proud of it! I can now run a sim for a general race for as many drivers as I want, all with their own maxSpeed set, and the results are randomised, but based mostly on what their maxSpeed is. Cool! Unfortunately, today, I have been battling with trying to run the overall results. I tried it as a for loop, as a closure...a function...and I've had to give up! Always frustrating...actually kind of heart-breaking but that's where resilience needs to come in. So easy to feel disappointed but this is where I need to get more ruthless. I don't have ...