(home | about | stats)

Smurgle

Database

Game
  id
  customs_officer -> Player
  whos_move
  state -> index into state machine

Player
  id
  email
  secret

PlayerInGame
  player
  game
  money
  order

Move
  game
  player
  timestamp
  movetype -> declare, accept, challenge, discard

Process

First person creates a new Game and new Players by filling in email addresses. Players get emailed with a link smurgle.org/l/<secret> which is their secret login link.

On visiting a page

Show complete history of game up to now

If Game.whos_move == me, describe choices with clickable button else, say "Waiting for <player> to <do move>"

State machine

Initial state: Declare
Declare -> Customs officer accept [player pays duty]
Customs officer accept -> Next player decides not to inform
Next player decides not to inform -> Pass cards to next player, next player discard one card
Pass cards to next player, next player discard one card -> Declare [player gets one new card]

Declare -> Customs officer challenge
Customs officer challenge -> Declare [player pays fines or customs officer pays for defamation, set player to next, player gets four new cards]

Player make move -> Declare
Declare -> Customs officer accept [player pays duty]
Customs officer accept -> Next player informs 
Next player informs -> Declare [player pays fines or next player pays defamation, set player to next, player gets four new cards]

kryogenix.org owner. This is a pwyky site. Edit this document.