Inside a slot machine, how to program a mechanical slot machine