Main menu


Active games:
sandbox View Join Leave Del
The castle builders View Join Leave Del
Create a new game

Nomyx language files:
Rules examples
Basic rules
Rules definitions
Rules types
Voting system

Uploaded files:
Castle.hs
Date01.hs
Money2.hs
Tournament01.hs
Vote2.hs

Settings:
Player settings
Advanced
Logout

Viewing game: The castle builders

Description:
This game is set in the medieval era. This is your empire, my lord...

Agora

Players in game:

1 kau 55 luqui 146 visi0n
15 pyhax 61 Umbrall 159 Sherlock
16 Toxaris 63 Michael 166 NougatRillettes
20 tchakkazulu 82 Cookies 181 xxx
24 aranea 111 arse 191 Rahim
25 appapp 124 chrisdone
49 NNOTM 131 Andrew

Player "kau" won the game!

Rules

Active rules:

[Click to hide]
# Name Description Proposed by Code of the rule Assessed by
4 Unanimity Vote A proposed rule will be activated if a majority of players (minimum 2) vote for it, delay is one day System
onRuleProposed $ voteWith_ (majority `withQuorum` 2) $ assessOnEveryVote >> assessOnTimeDelay oneDay

Code of the rule:

X
onRuleProposed $ voteWith_ (majority `withQuorum` 2) $ assessOnEveryVote >> assessOnTimeDelay oneDay
System
5 Bank accounts to keep your gold coins kau
createBankAccount

Code of the rule:

X
createBankAccount
Rule 4
6 display bank accounts keep an eye on your gold kau
displayBankAccount

Code of the rule:

X
displayBankAccount
Rule 4
7 Castles Each player have to build a castle. A nice castle have 4 towers and a dungeon kau
voidRule $ do
   Castle.createCastles
   Castle.displayCastles

Code of the rule:

X
voidRule $ do
   Castle.createCastles
   Castle.displayCastles
Rule 4
8 Income earn you some gold aranea
voidRule $ winXEcuOnRuleAccepted 2 >> winXEcuPerDay 1

Code of the rule:

X
voidRule $ winXEcuOnRuleAccepted 2 >> winXEcuPerDay 1
Rule 4
9 Castle Victory Victory on castle completion aranea
voidRule $ do
  suppressRule 2
  cs <- readMsgVar_ Castle.castles
  let vict = map fst $ filter ((== (Castle 4 True)) . snd) cs
  when (length vict > 0) $ setVictory vict

Code of the rule:

X
voidRule $ do
  suppressRule 2
  cs <- readMsgVar_ Castles.castles
  let vict = map fst $ filter ((== (Castle 4 True)) . snd) cs
  when (length vict > 0) $ setVictory vict
Rule 4
14 Build Castle Parts Pay to build your castle -- 4th try kau
Castle5.buildCastleParts 3 5

Code of the rule:

X
Castle5.buildCastleParts 3 5
Rule 4
15 cancelVote The proposer of a rule can cancel the vote before it ends kau
-- When a rule is proposed, create a button to cancel it
Vote2.cancelVote

Code of the rule:

X
-- When a rule is proposed, create a button to cancel it
Vote2.cancelVote
Rule 4
17 Date (2nd attempt) Vote down rule #16. This rule creates a global date Michael
voidRule $ newMsgVar_ "Date" (Date 800 Spring)

Code of the rule:

X
voidRule $ newMsgVar_ "Date" (Date 800 Spring)
Rule 4
18 Display date Each town's crier declares the current date Michael
voidRule $ forEachPlayer_ $ \player -> do
    displayVar player (msgVar "Date") $ \(Date year season) ->
        "Tis " ++ show season ++ " in the year of our Lord, " ++ show year ++ "."

Code of the rule:

X
voidRule $ forEachPlayer_ $ \player -> do
    displayVar player (msgVar "Date") $ \(Date year season) ->
        "Tis " ++ show season ++ " in the year of our Lord, " ++ show year ++ "."
Rule 4
20 date progression The date will increase whenever a new rule is proposed Michael
voidRule $ onEvent_ (RuleEv Proposed)
    $ const
    $ modifyMsgVar (msgVar "Date") $ \x ->
        case x of
            Date year Winter -> Date (year + 1) Spring
            Date year Spring -> Date year Summer
            Date year Summer -> Date year Fall
            Date year Fall -> Date year Winter

Code of the rule:

X
voidRule $ onEvent_ (RuleEv Proposed)
    $ const
    $ modifyMsgVar (msgVar "Date") $ \x ->
        case x of
            Date year Winter -> Date (year + 1) Spring
            Date year Spring -> Date year Summer
            Date year Summer -> Date year Fall
            Date year Fall -> Date year Winter
Rule 4
21 Tournament Master A great tournament is organized between the castle builders! The tournament will be led by a Tournament Master. The Tournament Master will be elected (soon). kau
voidRule $ newMsgVar_ "TournamentMaster" (Nothing :: Maybe PlayerNumber)

Code of the rule:

X
voidRule $ newMsgVar_ "TournamentMaster" (Nothing :: Maybe PlayerNumber)
Rule 4
23 kau wins I have 4 towers and a dungeon kau
-- There is a slight error in rule 9 "Castle Victory" (see forum).
-- As it is the spirit of the law that a player wins when he have 4 towers and a dungeon, 
-- I hereby declare that I am victorious.
iWin

Code of the rule:

X
-- There is a slight error in rule 9 "Castle Victory" (see forum).
-- As it is the spirit of the law that a player wins when he have 4 towers and a dungeon, 
-- I hereby declare that I am victorious.
iWin
Rule 4

Pending rules:

[Click to hide]
No Pending rules

Suppressed rules:

[Click to show]

Inputs/Ouputs

IO for Rule "Unanimity Vote" (#4):

Vote result for rule 5: For (kau: For, pyhax: For)
Vote result for rule 6: For (kau: For, pyhax: For)
Vote result for rule 7: For (kau: For, Toxaris: For)
Vote result for rule 9: For (kau: For, Toxaris: For, aranea: For)
Vote result for rule 8: For (kau: For, Toxaris: For, aranea: For)
Vote result for rule 11: Against (kau: Against, tchakkazulu: Against, aranea: Against, NNOTM: Against, Umbrall: Against)
Vote result for rule 10: Against (kau: Against, Toxaris: Against, tchakkazulu: Against, aranea: For, NNOTM: For, Umbrall: For)
Vote result for rule 12: For (kau: For, Toxaris: For, tchakkazulu: For, aranea: For, NNOTM: For, Umbrall: For, Michael: For)
Vote result for rule 13: Against (kau: Against, tchakkazulu: Against, aranea: Against, NNOTM: Against, Michael: Against)
Vote result for rule 14: For (kau: For, aranea: For, NNOTM: Against, Michael: For)
Vote result for rule 15: For (kau: For, tchakkazulu: For, aranea: For, NNOTM: For, Umbrall: For, Michael: For)
Vote result for rule 16: Against (kau: Against, tchakkazulu: For, aranea: Against, NNOTM: Against, Umbrall: For, Michael: For)
Vote result for rule 17: For (kau: For, tchakkazulu: For, NNOTM: For, Michael: For)
Vote result for rule 18: For (kau: For, tchakkazulu: For, NNOTM: For, Michael: For)
Vote result for rule 19: Against (kau: Against, tchakkazulu: Against, NNOTM: Against, Michael: Against)
Vote result for rule 20: For (kau: For, tchakkazulu: For, NNOTM: For, Michael: For)
Vote result for rule 21: For (kau: For, NNOTM: For, Michael: For)
Vote result for rule 22:  (kau: For)
Vote result for rule 23: For (kau: For, tchakkazulu: For)

IO for Rule "display bank accounts" (#6):

Accounts:
kau	0
Rahim	0
xxx	6
NougatRillettes	8
Sherlock	8
visi0n	9
Andrew	9
chrisdone	9
arse	9
Michael	15
Cookies	9
Umbrall	9
NNOTM	9
luqui	9
tchakkazulu	1
appapp	10
aranea	7
Toxaris	10
pyhax	10

IO for Rule "Castles" (#7):

Castles:
kau	0 towers and no dungeon
Rahim	0 towers and no dungeon
xxx	0 towers and no dungeon
NougatRillettes	0 towers and no dungeon
Sherlock	0 towers and no dungeon
visi0n	0 towers and no dungeon
Andrew	0 towers and no dungeon
chrisdone	0 towers and no dungeon
arse	0 towers and no dungeon
Michael	0 towers and no dungeon
Cookies	0 towers and no dungeon
Umbrall	0 towers and no dungeon
NNOTM	0 towers and no dungeon
luqui	0 towers and no dungeon
tchakkazulu	3 towers and no dungeon
appapp	0 towers and no dungeon
aranea	0 towers and a dungeon
Toxaris	0 towers and no dungeon
pyhax	0 towers and no dungeon

IO for Rule "Build Castle Parts" (#14):

Build Tower 3
Build Dungeon 5

IO for Rule "Display date" (#18):

Tis Winter in the year of our Lord, 800.

Propose a new rule:

Details

[Click to show]