Donation game exercise
**********************


Prerequisites
=============

* Writing a timeline

* Querying and storing database objects


Exercise
========

Design an experiment where each participant starts with a random
number of dollars, stored in the participant variable "dollars". Write
a "while_loop()" in the timeline containing a page that shows one push
button ("PushButtonControl") for each participant in the study,
labeled with that participant's ID and current dollar amount. Pushing
a button donates $1 to that participant. Can you generalize these
mechanics to make an interesting behavioral economics game?

**Tasks:**

* Make the button choices correspond to the participants who are
  actually in the database.

  * Query for participants with "Participant.query".

  * The page depends on the database at the moment the participant
    reaches it, so build it inside a "PageMaker".

  * Use participant IDs as "choices" and put the display text,
    including each participant's current money, in "labels". Avoid
    unusual symbols in "choices".

* When a button is clicked, transfer the money.

  * Take $1 from the current participant and give it to the chosen
    participant.

  * Put this logic in a "CodeBlock" after the page. The page's answer
    is available there as "participant.answer".
