A lot of slot machines used to work like that. The outcome appears to be random, but is in fact a big hard coded table determining the outcome depending on current state. If you know the table and are able to determine the state of the machine, it's easy to cheat the game.
I remember having read similar stories about slot machines in Germany.