Skip to content
wimag edited this page Jul 13, 2016 · 6 revisions

Simplest of all top level games - Lotto.

Rules

Each player generates his private "Ticket" - a set of 5 random numbers in range from 1 to 30. Then players keep picking next common random number until someone's victory is met.

GUI

GUI is as simple as this game: just a Swing popup dialog

How it works

Game starts with handshake between all users of given Chat

After that game proceeds with following steps:

  1. Each player picks a Ticket via GUI
  2. Each player broadcasts hash of his (Salted) Ticket to all other players
  3. If two or more players got the same set of number - repeat step 2
  4. Players agree on common random number via [Random Number Game]
  5. Step 3 is repeated untill someone(possybly, several players) claims his victory sending everyone his ticket and it's salt(that was used for hashing)
  6. All other players verify this ticked and agree/disagree on his victory
Clone this wiki locally