-
Notifications
You must be signed in to change notification settings - Fork 4
Lotto
wimag edited this page Jul 13, 2016
·
6 revisions
Simplest of all top level games - Lotto.
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 is as simple as this game: just a Swing popup dialog
Game starts with handshake between all users of given Chat
After that game proceeds with following steps:
- Each player picks a Ticket via GUI
- Each player broadcasts hash of his (Salted) Ticket to all other players
- If two or more players got the same set of number - repeat step 2
- Players agree on common random number via [Random Number Game]
- 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)
- All other players verify this ticked and agree/disagree on his victory