One can get fc-solve to run in a mode where it reports lines like:
"Move 2 cards from stack 6 to stack 1"
Okay, one really needs to move the top card somewhere else before moving
the other card that is underneath. But the message doesn't say that.
some freecell or free column is being used to hold the card as an
intermediate. Shouldn't it?
Also, is there a way to get it to report what card is being moved?
Here is the file move.c and part of the routine in it.
char * freecell_solver_move_to_string_w_state(fcs_state_with_locations_t
* state, int freecells_num, int stacks_num, int decks_num, fcs_move_t
move, int standard_notation)
{
char string[256];
switch(fcs_move_get_type(move))
{
case FCS_MOVE_TYPE_STACK_TO_STACK:
if ((standard_notation == 2) &&
/* More than one card was moved */
(fcs_move_get_num_cards_in_seq(move) > 1) &&
/* It was a move to an empty stack */
(fcs_stack_len(state->s, fcs_move_get_dest_stack(move)) ==
fcs_move_get_num_cards_in_seq(move))
)
{
sprintf(string, "%i%iv%x",
1+fcs_move_get_src_stack(move),
1+fcs_move_get_dest_stack(move),
fcs_move_get_num_cards_in_seq(move)
);
}
else if (standard_notation)
{
sprintf(string, "%i%i",
1+fcs_move_get_src_stack(move),
1+fcs_move_get_dest_stack(move)
);
}
else
{
sprintf(string, "Move %i cards from stack %i to stack %i",
fcs_move_get_num_cards_in_seq(move),
fcs_move_get_src_stack(move),
fcs_move_get_dest_stack(move)
);
}
break;
// ....the other cases chopped out here.
}
}
Received on Mon May 10 2004 - 14:37:39 IDT