Hi guys, I'm building a slot machine console program, and I need to make the columns stop rotating one by one. I have manage to make the whole array visually 'rotate', so the whole array spins and stops at the same time, but I don't know how to separate the columns (each wheel).
I'm really stucked on how to do this. Any help will be kindly appreciated
This is the section for randomising and printing the slots from the array
Real slot machines spin each wheel at a different rate, and stop each one at a different time.
Your main is way too long.
Move blocks of code out into functions for clarity of purpose, not to mention ease of reading.
1 2 3 4 5 6 7 8 9 10
while (input != 'n')
{
//take 1 coin for each game
coins--;
//loop for randomising the slots (array elements)
animateSlots(slots);
coins += winnings(slots);
input = playAgain();
}
Thanks, I've done that now on my main code. How would I go to stop each column one by one? I've managed to make them spin and stop, but all at the same time.