How to stop a minecart at a random moment? [duplicate]
I'm working on a roulette table on a server that I'm playing on, inspired by MagmaMusen's video on YouTube:
It uses a minecart with an armor stand inside it. The minecart is not visible, but the top of the iron helmet on the armor stand is visible like a moving square on top of the diferent-coloured carpets above the minecart. The minecart goes in a circle (about 3x3 blocks big) on powered rails, until a player flicks a lever and stops the minecart by turning off the rails.
The main flaw of this is that the moment the roulette stops isn't random. This could cause some arguing between the players. How can I avoid this problem? Is it possible to have a button that will stop the rails at a random moment instead of the lever?
It would also be nice if you could avoid using too complicated redstone circuits and command blocks.
Note: You can check out MagmaMusen's video "How to make a Working Roulette Table" if you didn't get the way it works from my explanation.
You want a system that will use a random feature of the game. I used dispensers. The redstone on the image looks a bit big, but I just placed the parts of it farther away to look less complicated. Here's some images:
Now, let's dig deeper:
Start button
Button Switch. Each time the input signal goes off, the output signal changes (goes on if it was off and vice versa) - something like a button to lever converter. Here's how it works:
The input must power both pistons at once.
Fast Redstone clock
Piston on/off switch for the clock
Randomizer. There's a dispenser with 8 stacks of items which won't pass through the water (eg. chicken eggs or snowballs) and 1 stack which will (normal items). The system will power the Dispenser each second until a shooted item powers the pressure plate. To reset it just go to the sign and collect the item. A screenshot:
Roulette (minecart stopper)
Signal shortener - basically a lever to button converter. This sends a short signal each time it's powered.
Minecart releaser. This will release the Minecart onto the roulette rail.