Skip to content

Commit

Permalink
Add iteration algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelLefkowitz committed Jun 23, 2024
1 parent 88cd057 commit f60d30f
Show file tree
Hide file tree
Showing 35 changed files with 1,230 additions and 1,006 deletions.
2 changes: 2 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"outfile",
"purescript",
"purs",
"snoc",
"newtype",
"purty",
"spago",
"trufflehog",
Expand Down
1 change: 1 addition & 0 deletions .trufflehog3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ exclude:
paths:
- generated-docs
- output
- package-lock.json
- spago.lock
- yarn-error.log
- yarn.lock
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@ Boggle solver.
spago install boggle
```

## Usage

```purs
import Data.Matrix (Matrix(..))
import Data.Word (boggle)
boggle (Matrix [ [ "a", "b" ], [ "c", "d" ] ]) 4
>>> [
{ path: [ { x: 0, y: 1 }, { x: 0, y: 0 }, { x: 1, y: 0 } ], word: "cab" },
{ path: [ { x: 0, y: 1 }, { x: 0, y: 0 }, { x: 1, y: 1 } ], word: "cad" },
{ path: [ { x: 1, y: 0 }, { x: 0, y: 0 }, { x: 1, y: 1 } ], word: "bad" },
{ path: [ { x: 1, y: 1 }, { x: 0, y: 0 }, { x: 1, y: 0 } ], word: "dab" },
]
```

## Documentation

Documentation and more detailed examples are hosted on [Github Pages](https://joellefkowitz.github.io/boggle).
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"packageManager": "yarn@4.1.1",
"scripts": {
"postinstall": "husky",
"format": "prettier . --write && echo src test | xargs -n1 npx purty --write",
"format": "prettier . --write && echo src test | xargs -n1 purty --write",
"lint": "cspell . --dot --gitignore && eslint . --fix --no-error-on-unmatched-pattern && trufflehog3"
},
"resolutions": {
Expand Down
Loading

0 comments on commit f60d30f

Please sign in to comment.