[
    {
        "name": "AStar",
        "comment": " The A-Star pathfinding algorithm.\n\n@docs Position\n@docs Path\n@docs findPath\n@docs straightLineCost\n@docs pythagoreanCost\n",
        "unions": [],
        "aliases": [
            {
                "name": "Path",
                "comment": " A path is a `List` of `Position`s.\n",
                "args": [],
                "type": "List Position"
            },
            {
                "name": "Position",
                "comment": " A position is just a pair of (x,y) coordinates.\n",
                "args": [],
                "type": "( Int, Int )"
            }
        ],
        "values": [
            {
                "name": "findPath",
                "comment": " Find a path between the `start` and `end` `Position`s. You must\n  supply a cost function and a move function.\n\n  The cost function must estimate the distance between any two\n  positions. It doesn't really matter how accurate this estimate is,\n  as long as it *never* overestimates.\n\n  The move function takes a `Position` and returns a `Set` of possible\n  places you can move to in one step.\n\n  If this function returns `Nothing`, there is no path between the two\n  points. Otherwise it returns `Just` a `List` of steps from `start`\n  to `end`.\n\n  Example usage.\n\n     import AStar exposing (..)\n\n\n     type World =\n         ...your custom code...\n\n\n     movesFrom : World -> Position -> Set Position\n     movesFrom world (x,y) =\n         ...your custom code...\n\n\n     findPath\n         straightLineCost\n         (movesFrom currentWorld)\n         ( 0, 0 ) ( 2, 0 )\n     --> Just [ ( 1, 0 ), ( 2, 0 ) ]\n",
                "type": "(Position -> Position -> Float) -> (Position -> Set Position) -> Position -> Position -> Maybe Path"
            },
            {
                "name": "pythagoreanCost",
                "comment": " An alternative costing algorithm, which calculates pythagorean distance.\n",
                "type": "Position -> Position -> Float"
            },
            {
                "name": "straightLineCost",
                "comment": " A simple costing algorithm. Think of it as the number of moves a\nrook/castle would have to make on a chessboard. Even if your piece can\nmove diagonally it will still work! A-Star only requires that the cost\nfunction *never* overestimates.\n",
                "type": "Position -> Position -> Float"
            }
        ],
        "binops": []
    },
    {
        "name": "AStar.Generalised",
        "comment": " This is the real algorithm. The types are generalised here.\n\nWe publish simple types to the user which assume they're working with\na 2D grid.\n\nBut in reality, we aren't tied to (x,y) positions and we don't care\nwhat the terrain model is. Positions can be any type you like (as long\nas it's `comparable` so that we can use it as a dictionary\nkey).\n\nBut...that makes the type signatures pretty unintuitive to newer\nusers, so we hide them away here.\n\n@docs findPath\n",
        "unions": [],
        "aliases": [],
        "values": [
            {
                "name": "findPath",
                "comment": " Find a path between the `start` and `end` `Position`s. You must\n  supply a cost function and a move function.\n\nSee `AStar.findPath` for a getting-started guide. This is a more\ngeneral version of that same function.\n",
                "type": "(comparable -> comparable -> Float) -> (comparable -> Set comparable) -> comparable -> comparable -> Maybe (List comparable)"
            }
        ],
        "binops": []
    }
]