24game-solver 中文文档教程
24 Game Solver
以较少的重复结果解决 24 场比赛。
Usage
节点
const solve24game = require('24game-solver');
const result = solve24game([a, b, c, d], goal);
浏览器 solve24game
<script type='text/javascript' src='dist/24game-solver.js'></script>
<script type='text/javascript'>
var result = solve24game([a, b, c, d], goal);
</script>
API
(nums,goal)
nums
- An array of numbers between 1 and 13, array length must between 3 and 6.goal
- A number between 0 and 99.
Test Case
运行 npm test
运行测试用例。
24 Game Solver
Solve 24 game with less duplicated results.
Usage
Node
const solve24game = require('24game-solver');
const result = solve24game([a, b, c, d], goal);
Brwoser
<script type='text/javascript' src='dist/24game-solver.js'></script>
<script type='text/javascript'>
var result = solve24game([a, b, c, d], goal);
</script>
API
solve24game(nums,goal)
nums
- An array of numbers between 1 and 13, array length must between 3 and 6.goal
- A number between 0 and 99.
Test Case
Run npm test
to run the test cases.