Skip to content

Commit

Permalink
Refactoring / code cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
shlomif committed Nov 15, 2023
1 parent 3609d69 commit dcef9a2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 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 @@ -258,15 +258,22 @@ export function fc_solve_expand_move(
/^Move ([0-9]+) cards from stack ([0-9]+) to stack ([0-9]+)$/,
);

const raw_ret = [
{
str: initial_move.str,
type: "m",
},
];

if (!matched) {
return [initial_move];
return raw_ret;
}

const ultimate_num_cards = _to_int(matched[1]);

// TODO : Implement the case where the sequence move is unlimited.
if (ultimate_num_cards === 1) {
return [initial_move];
return raw_ret;
}

const ultimate_source = _to_int(matched[2]);
Expand Down

0 comments on commit dcef9a2

Please sign in to comment.