twentyfour 0.1.0

A solver for the 24 card game
Documentation
  • Coverage
  • 26.32%
    5 out of 19 items documented0 out of 1 items with examples
  • Size
  • Source code size: 28.21 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 6.65 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • allan2/24
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • allan2

24

A solver for the 24 card game. https://ayz.ai/24

The objective of the game is to find a way to combine four positive integers using arithmetic operations to obtain a target (the number 24). Exponentiation is supported.

Things to improve:

  • more deduplication of solutions
  • fix excessive cloning of Ops in Card
  • better serialization from solve24 across WebAssembly ABI
  • suppport factorials

Usage

To compile twentyfour-wasm for the frontend, run the following from the project root:

cargo build -p twentyfour-wasm --release --target wasm32-unknown-unknown
wasm-bindgen target/wasm32-unknown-unknown/release/twentyfour_wasm.wasm --out-dir frontend/pkg

cd frontend
pnpm build

Helpful Resources

The solver itself was based on dbkaplun/solve24-rs.

Contributing

PRs welcome!