Parties
Text
1. This is a public contract.
2. The name of this contract is "Flapjack".
3. A namespace is comprised of a name and a set of definitions (of names). A
definition within a namespace can be referenced by the name of the namespace,
two colons (::), then the name that the definition defines.
4. There is a namespace with the name of "Agora", which contains all the
definitions of Agora.
5. There is a namespace with the name of "" (the empty string), which is
identical to the namespace with the name of "Agora".
6. There is a namespace with the name of "Flapjack".
7. Text delimited by "FLAPJACK: {" and "}" is considered to use definitions
in the namespace with the name of "Flapjack" unless explicitly qualified in an
announcement. Other text is in the Agora namespace by default in announcements.
8. Any definition this contract makes or uses after this clause
is implicitly in the namespace with the name of "Flapjack" unless explicitly
qualified.
9. A namespace is a ::namespace.
10. The namespace "Agora" is ::Agora.
11. The namespace "Flapjack" is ::Flapjack.
12. The namespace "" (the empty string) is ::.
13. An announcement is an ::announcement.
14. A person is a ::person.
15. Registered is a state of a person. A person can flip their registered state
to TRUE by announcement, this is called 'registering'. A person can flip their
registered state to FALSE by announcement, this is called 'deregistering'.
16. A player is a person who is registered.
17. A player is active if they have participated (made any announcements) in the
past week.
18. A proposal has a number, a proposer (a player), a status (???, approved or
disdained), a mapping of players to votes and some text.
19. Any player may propose by announcement, specifying some text. A proposal is
then created with the number (MOST-POSITIVE-PROPOSAL-NUMBER + 1), the proposer
being the player who made the announcement, the status ??? and the text
specified.
20. The MOST-POSITIVE-PROPOSAL-NUMBER is the number of the most recently
proposed proposal, or 0 if there have been no proposals.
21. Any player may vote by announcement, specifying a proposal number and a vote
(either FOR, AGAINST or ABSTAIN). This requires that the proposal's status is
???. This retracts any previous vote they may have made on the proposal, and
adds a mapping from themself to the vote they chose in the proposal's mapping.
22. A proposal is passing if it has more FOR votes than AGAINST votes
and at two-thirds of active players (rounded up) have voted.
23. A proposal is failing if it is not passing.
24. The proposer may activate a proposal by announcement by specifying
its number. If it is passing, this contract changes as dictated by the text and
its status becomes approved. Otherwise, its status becomes disdained.
25. Any non-player CAN leave this contract by announcement.