This program uses the rules as recorded by the Shalom Hartman Institute, briefly:
The pot gets replenished when it gets too low by getting one token from each player. Players that get down to zero tokens are out of the game.
The program is written in Java and the full source code is here. It should be straightforward to do similar programs in the visual programming environments Scratch and Game Maker. If you know of such implementations please let us know and we'll link to them.
If you have any comments please contact Mickey Segal. A listing of many Java resources is at this link (the Ein K'eloheinu page may be of particular interest).