Skip to content

Commit

Permalink
Extract a common class/struct.
Browse files Browse the repository at this point in the history
  • Loading branch information
shlomif committed Nov 15, 2023
1 parent dcef9a2 commit 1124a1f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions fc-solve/site/wml/src/ts/web-fc-solve--expand-moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,17 @@ function _render_move(my_move: Expander_Move): string {
return "Move a card from freecell " + src + " to stack " + dest;
}
}

interface Expander_RetElem {
str: string;
type: string;
}

class Expander {
public modified_state = { f: [], c: [] };
public empty_fc_indexes: number[] = [];
public empty_stack_indexes: number[] = [];
public ret_array: any[] = [];
public ret_array: Expander_RetElem[] = [];
public foundations_str: string;
public step_width: number;
constructor() {
Expand Down Expand Up @@ -253,7 +259,7 @@ export function fc_solve_expand_move(
initial_src_state_str: string,
initial_move: { str: string },
initial_dest_state_str: string,
) {
): Expander_RetElem[] {
const matched = initial_move.str.match(
/^Move ([0-9]+) cards from stack ([0-9]+) to stack ([0-9]+)$/,
);
Expand Down

0 comments on commit 1124a1f

Please sign in to comment.