This is a faproulette kind of game. You'll need a way to roll a 10-faced die. There are apps for that, or special dice, or you can use those on faproulette. The actions must be done on both nipples. Reroll as indicated until you reach a game-over condition.
X: 1d10
1-2: Clamp the peg sideways...