Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
This file gives a list of example rules that the players can submit. You can copy-paste them in the field Code of the web GUI. You can copy either the name of the function (i.e. "helloWorld") or its body (i.e. "outputAll_ "hello, world!""), but NOT both. Don't hesitate to get inspiration from there and create your own rules!
- nothing :: Rule
- helloWorld :: Rule
- accounts :: MsgVar [(PlayerNumber, Int)]
- createBankAccounts :: Rule
- displayBankAccounts :: Rule
- winXEcuPerDay :: Int -> Rule
- winXEcuOnRuleAccepted :: Int -> Rule
- moneyTransfer :: Rule
- delRule :: RuleNumber -> Rule
- voteWithMajority :: Rule
- king :: MsgVar PlayerNumber
- makeKing :: PlayerNumber -> Rule
- monarchy :: PlayerNumber -> Rule
- revolution :: PlayerNumber -> Rule
- displayCurrentTime :: Rule
- displayActivateTime :: Nomex ()
- iWin :: Rule
- returnToDemocracy :: [RuleNumber] -> Rule
- victoryXRules :: Int -> Rule
- victoryXEcu :: Int -> Rule
- noGroupVictory :: Rule
- banPlayer :: PlayerNumber -> Rule
- gameMaster :: MsgVar PlayerNumber
- bravoButton :: Rule
- enterHaiku :: Rule
- helloButton :: Rule
Documentation
helloWorld :: Rule Source
A rule that says hello to all players
accounts :: MsgVar [(PlayerNumber, Int)] Source
account variable name and type
createBankAccounts :: Rule Source
Create a bank account for each players
displayBankAccounts :: Rule Source
Permanently display the bank accounts
winXEcuPerDay :: Int -> Rule Source
each player wins X Ecu each day you can also try with "minutly" or "monthly" instead of "daily" and everything in the "time-recurrence" package
winXEcuOnRuleAccepted :: Int -> Rule Source
a player wins X Ecu if a rule proposed is accepted
a player can transfer money to another player
delRule :: RuleNumber -> Rule Source
delete a rule
voteWithMajority :: Rule Source
a majority vote, with the folowing parameters: a quorum of 2 voters is necessary for the validity of the vote the vote is assessed after every vote in case the winner is already known the vote will finish anyway after one day
makeKing :: PlayerNumber -> Rule Source
player pn is the king: we create a variable King to identify him, and we prefix his name with King
monarchy :: PlayerNumber -> Rule Source
Monarchy: only the king decides which rules to accept or reject
revolution :: PlayerNumber -> Rule Source
Revolution! Hail to the king! This rule suppresses the democracy (usually rules 1 and 2), installs the king and activates monarchy.
displayCurrentTime :: Rule Source
will display the current time (when refreshing the screen)
displayActivateTime :: Nomex () Source
will display the time at which the rule as been activated
Rule that state that you win. Good luck on having this accepted by other players ;)
returnToDemocracy :: [RuleNumber] -> Rule Source
Change current system (the rules passed in parameter) to absolute majority (half participants plus one)
victoryXRules :: Int -> Rule Source
set the victory for players having more than X accepted rules
victoryXEcu :: Int -> Rule Source
Only one player can achieve victory: No group victory. Forbidding group victory usually becomes necessary when lowering the voting quorum: a coalition of players could simply force a "victory" rule and win the game.
banPlayer :: PlayerNumber -> Rule Source
kick a player and prevent him from returning
display a button and greets you when pressed (for player 1)
enterHaiku :: Rule Source
display a button to greet other players