Introduction

Find out a card using a sentence made up by another player

A player (who we will call the author) creates a new game. He chooses a card, picks a word or a sentence to describe it and invites players to participate. Each players is given seven cards and are required to pick one that best matches the author's sentence. Once enough players have chosen a card, the author displays all chosen cards and the players try to figure out which one is the author's. The author wins if at least one of the players guesses right, but not all of them do. The winners are the author and the players who guessed right. If the author loses, all the other players win.

Play online

Discuss

  •  Chat (IRC: #farsides on irc.freenode.net)

Install localy

Append the lines for the distributions you are running (see below) to the /etc/apt/sources.list file and then run the following commands:

sudo apt-get update
sudo apt-get install cardstories

 Debian GNU/Linux

  • unstable

deb  http://cardstori.es/packaging-farm/cardstories/gnulinux/debian/x86_64/unstable/src ./

deb-src  http://cardstori.es/packaging-farm/cardstories/gnulinux/debian/x86_64/unstable/src ./

  • wheezy

deb  http://cardstori.es/packaging-farm/cardstories/gnulinux/debian/x86_64/wheezy/src ./

deb-src  http://cardstori.es/packaging-farm/cardstories/gnulinux/debian/x86_64/wheezy/src ./

  • squeeze

deb  http://cardstori.es/packaging-farm/cardstories/gnulinux/debian/x86_64/squeeze/src ./

deb-src  http://cardstori.es/packaging-farm/cardstories/gnulinux/debian/x86_64/squeeze/src ./

 Ubuntu

  • maverick

deb  http://cardstori.es/packaging-farm/cardstories/gnulinux/debian/x86_64/maverick/src ./

deb-src  http://cardstori.es/packaging-farm/cardstories/gnulinux/debian/x86_64/maverick/src ./

  • natty

deb  http://cardstori.es/packaging-farm/cardstories/gnulinux/debian/x86_64/natty/src ./

deb-src  http://cardstori.es/packaging-farm/cardstories/gnulinux/debian/x86_64/natty/src ./

Load the GPG public key to verify the signature of the packages:

curl  http://cardstori.es/packaging-farm/cardstories.gpg | sudo apt-key add -

Hacking

Getting a copy of the repository

git clone http://cardstori.es/cardstories.git

The branches are organized as follows:

Running

  • display usage
    PYTHONPATH=.:etc/cardstories twistd cardstories --help
    
  • run locally
    PYTHONPATH=.:etc/cardstories twistd --nodaemon cardstories --static $(pwd)/static --port 5000 --interface 0.0.0.0 --db /tmp/cardstories.sqlite --plugins-dir plugins --plugins 'auth solo' --plugins-pre-process 'auth solo' --plugins-post-process auth --plugins-libdir /tmp
    
  • run locally with mails
    PYTHONPATH=.:etc/cardstories twistd --nodaemon cardstories --static $(pwd)/static --port 5000 --interface 0.0.0.0 --db /tmp/cardstories.sqlite --plugins-dir plugins --plugins 'auth solo mail' --plugins-pre-process 'auth solo' --plugins-post-process auth --plugins-libdir /tmp --plugins-confdir tests
    
  • check if the webservice replies. The following must return the {"win": {}, "games": [], "modified": 0} string
    curl --silent 'http://localhost:5000/resource?action=lobby&my=true&player_id=TEST&in_progress=yes'
    

Testing

  • Running the server tests:
    make -f maintain.mk check
    
  • Running the client tests localy:

 http://localhost:5000/static/test

  • Running the client tests with coverage (requires make -f maintain.mk check to be run before) :

 file://THE CLONED DIRECTORY/static-coverage/jscoverage.html?test/index.html

 http://cardstori.es/cardstories/WoW-Gamecard/

Work in progress

Articles

 cardstories at dachary.org