Safe Haskell | None |
---|
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. Don't hesitate to get inspiration from there and create your own rules!
- nothing :: RuleFunc
- helloWorld :: RuleFunc
- accounts :: V [(PlayerNumber, Int)]
- createBankAccount :: RuleFunc
- winXEcuPerDay :: Int -> RuleFunc
- winXEcuOnRuleAccepted :: Int -> RuleFunc
- moneyTransfer :: RuleFunc
- delRule :: RuleNumber -> RuleFunc
- voteWithMajority :: RuleFunc
- king :: V PlayerNumber
- makeKing :: PlayerNumber -> RuleFunc
- monarchy :: RuleFunc
- revolution :: PlayerNumber -> RuleFunc
- victoryXRules :: Int -> RuleFunc
- victoryXEcu :: Int -> RuleFunc
- displayTime :: RuleFunc
- noGroupVictory :: RuleFunc
- iWin :: RuleFunc
- returnToDemocracy :: RuleFunc
- banPlayer :: PlayerNumber -> RuleFunc
- referendum :: String -> Nomex () -> RuleFunc
- referendumOnKickPlayer :: RuleFunc
- gameMasterElections :: RuleFunc
- module Data.Time.Recurrence
- module Control.Monad
- module Data.List
- module Data.Time.Clock
Documentation
A rule that says hello to all players
accounts :: V [(PlayerNumber, Int)]Source
account variable name and type
createBankAccount :: RuleFuncSource
Create a bank account for each players
winXEcuPerDay :: Int -> RuleFuncSource
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 -> RuleFuncSource
a player wins X Ecu if a rule proposed is accepted
moneyTransfer :: RuleFuncSource
a player can transfer money to another player it does not accept new players or check if balance is positive, to keep the example simple
delRule :: RuleNumber -> RuleFuncSource
delete a rule
voteWithMajority :: RuleFuncSource
a majority vote,
makeKing :: PlayerNumber -> RuleFuncSource
player pn is the king: we create a variable King to identify him, and we prefix his name with King
revolution :: PlayerNumber -> RuleFuncSource
Revolution! Hail to the king! This rule suppresses the democracy (usually rules 1 and 2), installs the king and activates monarchy.
victoryXRules :: Int -> RuleFuncSource
set the victory for players having more than X accepted rules
victoryXEcu :: Int -> RuleFuncSource
will display the time to all players in 5 seconds
noGroupVictory :: RuleFuncSource
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.
Rule that state that you win. Good luck on having this accepted by other players ;)
returnToDemocracy :: RuleFuncSource
Change unanimity vote (usually rule 1) to absolute majority (half participants plus one)
banPlayer :: PlayerNumber -> RuleFuncSource
kick a player and prevent him from returning
referendum :: String -> Nomex () -> RuleFuncSource
referendumOnKickPlayer :: RuleFuncSource
triggers a referendum, if the outcome is yes player 2 will be kicked
gameMasterElections :: RuleFuncSource
triggers elections (all players are candidates), the winner becomes game master
module Data.Time.Recurrence
module Control.Monad
module Data.List
module Data.Time.Clock