nomyx-library-1.0.0: Library of rules for Nomyx

Safe HaskellSafe
LanguageHaskell98

Nomyx.Library.Bank

Description

This file gives a list of example rules that the players can submit.

Synopsis

Documentation

accounts :: V [(PlayerNumber, Int)] Source #

account variable name and type

createBankAccounts :: Rule Source #

Create a bank account for each players

depositAPI :: APICall (PlayerNumber, Int) Bool Source #

Declare an API to deposit money for a player The return value shows if the transaction was successful.

withdrawAPI :: APICall (PlayerNumber, Int) Bool Source #

Declare an API to withdraw money for a player. The return value shows if the transaction was successful.

balanceAPI :: APICall PlayerNumber (Maybe Int) Source #

Declare an API to get the balance of a player.

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

moneyTransfer :: Rule Source #

a player can transfer money to another player

transfer :: PlayerNumber -> (PlayerNumber, Int) -> Nomex () Source #

helper function to transfer money from first player to second player