An antique columnist said that a man presented, at the court of Alexander the Great (356 to 323 B.C.), a game that functioned as follows : By introducing a coin, players was able to up and down some balls who disappear in several different holes which can be opened or closed by the players. If players have chance, they earned the double of the bet.
This represents the oldest evidence of a coin-operated game.
400 years later, around 50 A.D, Heron of Alexandria invented the "Holy Water Vending Machine