ec2-54-236-62-49.compute-1.amazonaws.com | ToothyWiki | ToothyWikiInternals | RecentChanges | Login | Webcomic (MoonShadow) I've been hacking together a card game server at lunchtimes (it's less useful than trying to work out how the more obscure bits of the wiki code work so I can fix them, but it's more fun.) Here, roughly, is the way it's going to work:
Main page presents you with two menus. One is a list of decks, with links to actions you may do to each deck. The other is a list of ongoing and finished games, with links to actions you may do to each game.
(default) List decks and games, with action menus
Create new deck - lets you type in a deck description (e.g. "Standard set of 52 playing cards", "Set of playing cards with four jokers", "Uno cards", ...) with an optional link to a ToothyWiki page; then presents you with view/edit screen.
View/edit deck - displays a text box. You enter one line of text per card the deck contains, describing the card.
Remove deck - deletes a deck
Start a new game using deck - makes a new shuffled deck, stored on the server, by shuffling all the lines of the deck into a random order and attaching a random number to the end of each one before signing it.
View game - gives the list of signatures, in order, representing the deck. For cards that have been dealt, says who and when they were dealt to. If the game is over, and/or for cards that were dealt face-up, displays the corresponding text next to each signature.
Deal a card face-up - reveal the text of the next card that hasn't been dealt, both to you and in the log.
Deal a card face-down - reveal the text of the next card that hasn't been dealt, just to you.
Finish game (reveal all cards)
The idea is you can all see the backs of the cards (the signatures) and talk about them ("I choose card u49845y"), pass them around face down ("I give card duf934y95 to Vitenka; I've emailed him to tell him what it is, and he can check it against its signature if he doesn't trust me") and reveal them when the time comes; after the game is over, the log is revealed so people can check the game was fair if they are bothered.
Can people think of a game for which this is not sufficient?
Hmmm. Yes. Any game for which public (face-up) cards can go into someone's private hand, and that person can then do face-down actions with a card from their hand (eg pass it to another player) without everyone else knowing which card that was meant to be.
In other words, I think the description as above "marks" each card permanently for the length of the game, as soon as it's been turned face-up *once*. This could cause trouble if face-down actions could later happen to that card. --AlexChurchill, making trouble
Hm. Yes, chase-the-ace comes to mind. Once cards have been dealt, though, the server no longer has control of them. You could always add random numbers to all the cards in your hand, sign them again and publish the new signatures, but this will quickly get unwieldy. You could just sign the order in which you are holding your cards, and then say things like "I choose the nth card from X's hand", or "I pass the nth card to Y"; it'll mean people need to do rather more checking at the end of the game to make sure no-one's cheated, and it'll need people to archive a rather unwieldy amount of information. I suspect Wiki+helper script is probably not a good medium for this class of games - they really need a dedicated app that hides all the crypto from people behind a nice GUI :( - MoonShadow
I suspect you're right. I also think it's probably not a good medium for most of them for a rather different reason: how many Wiki edits would a game of, say, Uno take? And how many weeks? It might be worth doing for a game like Bridge, but for "lighter" games like Chase the Ace, I'm not sure anyone would bother trying to play on the Wiki. At least RockScissorsPaper doesn't take long. The proposal as described above allows Bridge and Eleusis, which are probably strategic / interesting enough to be worth taking the time to play on the Wiki. I reckon that's enough. --AlexChurchill
A seriously NotGood? plan. There are other card table servers out there, I suggets using one rather than writing a new one. Tracking what cards are in peoples hands will just be painful in a game more complicated than bridge. --Vitenka