Skip to content

Commit

Permalink
work on displaying iters-count ("num_times") and num stored states [ …
Browse files Browse the repository at this point in the history
…WiP ]
  • Loading branch information
shlomif committed May 14, 2024
1 parent 4861d24 commit dc7ff45
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
9 changes: 8 additions & 1 deletion fc-solve/site/wml/src/ts/tests/fcs-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ function my_func(qunit: QUnit, _my_mod, my_callback: () => void) {
);

qunit.test("FC_Solve user_get_num_times_long.", (assert) => {
assert.expect(1);
assert.expect(2);

const instance: w.FC_Solve = new FC_Solve({
module_wrapper,
Expand All @@ -252,12 +252,19 @@ function my_func(qunit: QUnit, _my_mod, my_callback: () => void) {
// The number of iterations of solving deal 24.
// Has a slight chance of changing in the future.
const EXPECTED_NUM_TIMES: number = 137;
const EXPECTED_NUM_STATES: number = 191;
// TEST
assert.equal(
instance.get_num_times_long(),
EXPECTED_NUM_TIMES,
"user_get_num_times_long()",
);
// TEST
assert.equal(
instance.get_num_states_in_collection_long(),
EXPECTED_NUM_STATES,
"user_get_num_states_in_collection_long()",
);
});

qunit.test(
Expand Down
7 changes: 7 additions & 0 deletions fc-solve/site/wml/src/ts/web-fc-solve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,13 @@ export class FC_Solve {

return that.module_wrapper.user_get_num_stacks(that.obj);
}
public get_num_states_in_collection_long(): number {
const that = this;

return that.module_wrapper.user_get_num_states_in_collection_long(
that.obj,
);
}
public get_sequence_move(): number {
const that = this;

Expand Down

0 comments on commit dc7ff45

Please sign in to comment.