Just an idea…but read up on some programming of throwing dice I’m sure alot of the math would be very similar.