File: prntsol.c

package info (click to toggle)
rubiks 20070912-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,052 kB
  • ctags: 1,046
  • sloc: cpp: 7,385; ansic: 7,350; makefile: 219
file content (20 lines) | stat: -rw-r--r-- 338 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "globals.h"

static char m[] = "FRUBLD";

prnt_sol()
{
int i, j, k;
    max_sol = cur_move;
    printf("Solution (%2d+%2d=%2d):",
	phase1_cur, cur_move-phase1_cur, cur_move);
    for(i = 0; i < cur_move; i++) {
	j = moves[i];
	k = j & 3;
	j = j >> 2;
	printf(" %c%d", m[j], k + 1);
    }
    printf("\n");
    fflush(stdout);
}