{
    "savegame": {
        "interval": 2000
    },

    "tutorial": {
        "delay": 650,
        "fadeDuration": 500,
        "crossFadeDelay": 0,
        "crossFadeDuration": 0,
        "puzzle": {
            "id": "tutorial",
            "skin": "LevelWith1SlotSkin",
            "decoration": "mill",
            "time": 120,
            "minMoves": 1,
            "boat": { "skin": "Boat2SkinNoSeats" },
            "actors": [
                {"id": "kid1", "weight": 1, "skin": "BoySkin"}
            ],
            "constraints": { "crossing": [], "boat": [], "failure": [] },
            "initialState": {
                "actors": { "BANK_FROM": ["kid1"], "BOAT": [], "BANK_TO": [] },
                "boat": "BANK_FROM"
            },
            "goalState": {
                "actors": { "BOAT": [], "BANK_TO": [] },
                "boat": "BANK_TO"
            }
        }
    },

    "modes": {
        "_default": ["familyOf4", "foxchickenworm", "wolfwolffoxchickenworm", "wolfdogchickenworm", "familyOf5", "foxchickenspidercaterpillarcarrot"],
        "demo": ["familyOf4"]
    },

    "puzzles": [
        {
            "id": "foxchickenworm",
            "skin": "LevelWith3SlotsSkin",
            "decoration": "tree",
            "time": 120,
            "minMoves": 17,

            "boat": {
                "skin": "Boat2Skin"
            },

            "actors": [
                {"id": "farmer", "weight": 1, "skin": "FarmerSkin", "fixed": true},
                {"id": "fox", "weight": 1, "skin": "FoxSkin"},
                {"id": "chicken", "weight": 1, "skin": "ChickenSkin"},      
                {"id": "worm", "weight": 1, "skin": "WormSkin"}
            ],

            "constraints": {
                "crossing": [
                    {"id": "noRower", "rule": "farmer==1", "locations": ["BOAT"]}
                ],
                "boat": [
                    {"id": "boatFull", "rule": "weight<=2", "locations": ["BOAT"]}
                ],
                "failure": [
                    {"id": "fox_eats_chicken", "rule": "fox==0 || chicken==0 || farmer==1", "locations": ["BANK_FROM", "BANK_TO"], "actors": ["chicken", "fox"]},
                    {"id": "chicken_eats_worm", "rule": "worm==0 || chicken==0 || farmer==1", "locations": ["BANK_FROM", "BANK_TO"], "actors": ["worm", "chicken"]}
                ]
            },

            "initialState": {
                "actors": {
                    "BANK_FROM": ["fox", "chicken", "worm"],
                    "BOAT": ["farmer"]
                },
                "boat": "BANK_FROM"
            },

            "goalState": {
                "actors": {
                    "BOAT": ["farmer"],
                    "BANK_TO": ["worm", "chicken", "fox"]
                },
                "boat": "BANK_TO"
            }
        },


        {
            "id": "familyOf4",
            "skin": "LevelWith4SlotsSkin",
            "decoration": "mill",
            "time": 135,
            "minMoves": 25,

            "boat": {
                "skin": "Boat2SkinNoSeats"
            },

            "actors": [
                {"id": "adult1", "weight": 2, "skin": "ManSkin", "seat": 2 },
                {"id": "adult2", "weight": 2, "skin": "WomanSkin", "seat": 2 },
                {"id": "kid1", "weight": 1, "skin": "BoySkin"},
                {"id": "kid2", "weight": 1, "skin": "GirlSkin"}
            ],

            "constraints": {
                "crossing": [
                    {"id": "noRower", "rule": "adult1 + adult2 + kid1 + kid2 > 0", "locations": ["BOAT"]}
                ],
                "boat": [
                    {"id": "boatFull", "rule": "weight<=2", "locations": ["BOAT"]}
                ],
                "failure": [] 
            },

            "initialState": {
                "actors": {
                    "BANK_FROM": ["adult1", "adult2", "kid1", "kid2"]
                },
                "boat": "BANK_FROM"
            },

            "goalState": {
                "actors": {
                    "BANK_TO": ["adult1", "adult2", "kid1", "kid2"]
                },
                "boat": "BANK_TO"
            }
        },


        {
            "id": "wolfwolffoxchickenworm",
            "skin": "LevelWith5SlotsSkin",
            "decoration": "tree",
            "time": 90,
            "minMoves": 21,

            "boat": {
                "skin": "Boat3Skin"
            },

            "actors": [
                {"id": "farmer", "weight": 1, "skin": "FarmerSkin", "fixed": true},
                {"id": "wolf1", "weight": 1, "skin": "WolfSkin"},
                {"id": "wolf2", "weight": 1, "skin": "WolfSkin"},
                {"id": "fox", "weight": 1, "skin": "FoxSkin"},   
                {"id": "chicken", "weight": 1, "skin": "ChickenSkin"}, 
                {"id": "worm", "weight": 1, "skin": "WormSkin"}            
            ],

            "constraints": {
                "crossing": [
                    {"id": "noRower", "rule": "farmer==1", "locations": ["BOAT"]}
                ],
                "boat": [
                    {"id": "boatFull", "rule": "weight<=3", "locations": ["BOAT"]}
                ],
                "failure": [
                    {"id": "wolf_eats_fox", "rule": "wolf1==0 || fox==0 || farmer==1", "locations": ["BANK_FROM", "BANK_TO"], "actors": ["fox", "wolf1"]},
                    {"id": "wolf_eats_chicken", "rule": "wolf1==0 || chicken==0 || farmer==1", "locations": ["BANK_FROM", "BANK_TO"], "actors": ["chicken", "wolf1"]},
                    {"id": "wolf_eats_fox", "rule": "wolf2==0 || fox==0 || farmer==1", "locations": ["BANK_FROM", "BANK_TO"], "actors": ["fox", "wolf2"]},
                    {"id": "wolf_eats_chicken", "rule": "wolf2==0 || chicken==0 || farmer==1", "locations": ["BANK_FROM", "BANK_TO"], "actors": ["chicken", "wolf2"]},
                    {"id": "fox_eats_chicken", "rule": "fox==0 || chicken==0 || farmer==1", "locations": ["BANK_FROM", "BANK_TO"], "actors": ["chicken", "fox"]},
                    {"id": "chicken_eats_worm", "rule": "worm==0 || chicken==0 || farmer==1", "locations": ["BANK_FROM", "BANK_TO"], "actors": ["worm", "chicken"]}
                ] 
            },

            "initialState": {
                "actors": {
                    "BANK_FROM": ["wolf1", "wolf2", "fox", "chicken", "worm"],
                    "BOAT": ["farmer"]
                },
                "boat": "BANK_FROM"
            },

            "goalState": {
                "actors": {
                    "BOAT": ["farmer"],
                    "BANK_TO": ["wolf1", "wolf2", "fox", "chicken", "worm"]
                },
                "boat": "BANK_TO"
            }
        },


        {
            "id": "wolfdogchickenworm",
            "skin": "LevelWith4SlotsSkin",
            "decoration": "mill",
            "time": 240,
            "minMoves": 21,

            "boat": {
                "skin": "Boat2Skin"
            },

            "actors": [
                {"id": "farmer", "weight": 1, "skin": "FarmerSkin", "fixed": true},
                {"id": "wolf", "weight": 1, "skin": "WolfSkin"},
                {"id": "dog", "weight": 1, "skin": "DogSkin"},   
                {"id": "chicken", "weight": 1, "skin": "ChickenSkin"}, 
                {"id": "worm", "weight": 1, "skin": "WormSkin"}            
            ],

            "constraints": {
                "crossing": [
                    {"id": "noRower", "rule": "farmer==1", "locations": ["BOAT"]}
                ],
                "boat": [
                    {"id": "boatFull", "rule": "weight<=2", "locations": ["BOAT"]}
                ],
                "failure": [
                    {"id": "wolf_eats_dog", "rule": "wolf==0 || dog==0 || farmer==1", "locations": ["BANK_FROM", "BANK_TO"], "actors": ["dog", "wolf"]},
                    {"id": "wolf_eats_chicken", "rule": "wolf==0 || chicken==0 || farmer==1", "locations": ["BANK_FROM", "BANK_TO"], "actors": ["chicken", "wolf"]},
                    {"id": "chicken_eats_worm", "rule": "worm==0 || chicken==0 || dog==1 || farmer==1", "locations": ["BANK_FROM", "BANK_TO"], "actors": ["worm", "chicken"]}
                ] 
            },

            "initialState": {
                "actors": {
                    "BANK_FROM": ["wolf", "dog", "chicken", "worm"],
                    "BOAT": ["farmer"]
                },
                "boat": "BANK_FROM"
            },

            "goalState": {
                "actors": {
                    "BOAT": ["farmer"],
                    "BANK_TO": ["wolf", "dog", "chicken", "worm"]
                },
                "boat": "BANK_TO"
            }
        }, 


        {
            "id": "familyOf5",
            "skin": "LevelWith5SlotsSkin",
            "decoration": "tree",
            "time": 90,
            "minMoves": 29,

            "boat": {
                "skin": "Boat2SkinNoSeats"
            },

            "actors": [
                {"id": "adult1", "weight": 2, "skin": "ManSkin", "seat": 2 },
                {"id": "adult2", "weight": 2, "skin": "WomanSkin", "seat": 2 },
                {"id": "kid1", "weight": 1, "skin": "BoySkin"},
                {"id": "kid2", "weight": 1, "skin": "GirlSkin"},
                {"id": "kid3", "weight": 1, "skin": "Kid3Skin"}
            ],

            "constraints": {
                "crossing": [
                    {"id": "noRower", "rule": "adult1 + adult2 + kid1 + kid2 + kid3 > 0", "locations": ["BOAT"]}
                ],
                "boat": [
                    {"id": "boatFull", "rule": "weight<=2", "locations": ["BOAT"]}
                ],
                "failure": [] 
            },

            "initialState": {
                "actors": {
                    "BANK_FROM": ["adult1", "adult2", "kid1", "kid2", "kid3"]
                },
                "boat": "BANK_FROM"
            },

            "goalState": {
                "actors": {
                    "BANK_TO": ["adult1", "adult2", "kid1", "kid2", "kid3"]
                },
                "boat": "BANK_TO"
            }
        },


        {
            "id": "foxchickenspidercaterpillarcarrot",
            "skin": "LevelWith5SlotsSkin",
            "decoration": "mill",
            "time": 240,
            "minMoves": 23,

            "boat": {
                "skin": "Boat3Skin"
            },

            "actors": [
                {"id": "farmer", "weight": 1, "skin": "FarmerSkin", "fixed": true},
                {"id": "fox", "weight": 1, "skin": "FoxSkin"},
                {"id": "chicken", "weight": 1, "skin": "ChickenSkin"},
                {"id": "spider", "weight": 1, "skin": "SpiderSkin"},    
                {"id": "caterpillar", "weight": 1, "skin": "CaterpillarSkin"},                     
                {"id": "carrot", "weight": 1, "skin": "CarrotSkin"}
            ],

            "constraints": {
                "crossing": [
                    {"id": "noRower", "rule": "farmer==1", "locations": ["BOAT"]}
                ],
                "boat": [
                    {"id": "boatFull", "rule": "weight<=3", "locations": ["BOAT"]}
                ],
                "failure": [
                    {"id": "fox_eats_chicken", "rule": "fox==0 || chicken==0 || farmer==1", "locations": ["BANK_FROM", "BANK_TO"], "actors": ["chicken", "fox"]},
                    {"id": "chicken_eats_spider", "rule": "spider==0 || chicken==0 || farmer==1", "locations": ["BANK_FROM", "BANK_TO"], "actors": ["spider", "chicken"]},
                    {"id": "spider_eats_caterpillar", "rule": "caterpillar==0 || spider==0 || farmer==1", "locations": ["BANK_FROM", "BANK_TO"], "actors": ["caterpillar", "spider"]},
                    {"id": "caterpillar_eats_carrot", "rule": "caterpillar==0 || carrot==0 || farmer==1", "locations": ["BANK_FROM", "BANK_TO"], "actors": ["carrot", "caterpillar"]}
                ] 
            },

            "initialState": {
                "actors": {
                    "BANK_FROM": ["fox", "chicken", "spider", "caterpillar", "carrot"],
                    "BOAT": ["farmer"]
                },
                "boat": "BANK_FROM"
            },

            "goalState": {
                "actors": {
                    "BOAT": ["farmer"],
                    "BANK_TO": ["carrot", "caterpillar", "spider", "chicken", "fox"]
                },
                "boat": "BANK_TO"
            }
        }

    ]
}