Skip to content

Commit

Permalink
support binary-star; WiP; seems to work
Browse files Browse the repository at this point in the history
  • Loading branch information
shlomif committed Jan 31, 2024
1 parent 7c1424b commit 2386767
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,17 @@ sub process_solution
my $IS_DETAILED_MOVE = $IS_BINARY_STAR;
my $IS_DISPLAYED_BOARD = $IS_BINARY_STAR;
my $num_decks = $self->_num_foundations();
my $num_foundations = $self->_num_foundations();

# As many moves as the number of cards.
MOVES:
for my $move_idx ( 0 .. ( $num_decks * $MAX_RANK * $NUM_SUITS - 1 ) )
for my $move_idx (
0 .. (
$num_decks * $MAX_RANK * $NUM_SUITS -
$num_foundations -
( $num_foundations > 1 )
)
)
{
my ( $move_line, $move_line_idx ) = $get_line->();

Expand Down Expand Up @@ -407,6 +414,7 @@ s#\AFoundations:(?: $CARD_RE){$foundation_idx} \K(\Q$fstr\E)#my$c=$1;"[ $c → $
"Column $i str is '$line' vs. '$wanted_line'");
}
}
$assert_empty_line->();
}
}
$card = $col->pop;
Expand Down

0 comments on commit 2386767

Please sign in to comment.