Making wheel slow down when in a certain range

I am currently trying to make a roulette wheel I coded slow down when in a certain range of the selected number whilst on its last spin. My current issue is that if the selected number is the lowest in the array then there wont be a slow down because it loops back after the highest numbers in the array which when coded will not have a close integer distance. The way the wheel works is it goes through an array is a courtrine going from the lowest to highest, making the currently selected part of the array light up briefly before moving to the next. this continues until it reaches a certain number of spins. I tried looking for a way to check how close an array was to looping but could not find a good way to implement it.

I’m not understanding but I have a theory. Are you choosing a number then simulating some sort of roulette wheel to make it look like you didn’t already choose the number? Isn’t this backwards?

Perhaps write a roulette wheel class that simulates the numbers changing. I believe it should be slowing down from the moment you start it spinning. It eventually stops and that is your number.

Meanwhile any graphic component would monitor a public property whose value is the current value of the spinning wheel.

1 Like

That works really well! Thank you so much!