home *** CD-ROM | disk | FTP | other *** search
- *** patchlevel.h Mon May 24 09:54:40 1993
- --- patchlevel.h.02 Mon May 24 10:50:54 1993
- ***************
- *** 1,7 ****
- ! #define VERSION "1.0.0"
- ! #define DATE "10 May 1993"
-
- /*
- * patch1 14 May 93 :Fix to seed_cube in cube.h; Bug became manifest in gcc
- * patch2 14 May 93 :Fix to ldfile.c; Bug became manifest in gcc
- */
- --- 1,10 ----
- ! #define VERSION "1.0.2"
- ! #define DATE "24 May 1993"
-
- /*
- * patch1 14 May 93 :Fix to seed_cube in cube.h; Bug became manifest in gcc
- * patch2 14 May 93 :Fix to ldfile.c; Bug became manifest in gcc
- + * patch3 24 May 93 :Patches for layer2.c, layer3.c, layer3twirl.c, and layer3flip.c.
- + * :Discovered when magicCube hung solving "Pons Asinorum"
- */
- +
- *** layer2.c Fri May 21 11:26:32 1993
- --- layer2.c.02 Fri May 21 13:08:25 1993
- ***************
- *** 300,319 ****
- * So a middle layer cube must be moved out to the bottom layer.
- */
- else {
- ! if(Front(5) == RIGHT &&
- ! Right(3) == FRONT){
- F(1);D(2);L(1);D(1);L(-1);D(2);F(-1);
- }
- ! else if(Right(5) == BACK &&
- ! Back(5) == RIGHT){
- R(1);D(2);F(1);D(1);F(-1);D(2);R(-1);
- }
- ! else if(Back(3) == LEFT &&
- ! Left(5) == BACK){
- B(1);D(2);R(1);D(1);R(-1);D(2);B(-1);
- }
- ! else if(Left(3) == FRONT &&
- ! Front(3) == LEFT){
- L(1);D(2);B(1);D(1);B(-1);D(2);L(-1);
- }
- return(False);
- --- 300,319 ----
- * So a middle layer cube must be moved out to the bottom layer.
- */
- else {
- ! if(Front(5) != FRONT ||
- ! Right(3) != RIGHT){
- F(1);D(2);L(1);D(1);L(-1);D(2);F(-1);
- }
- ! else if(Right(5) != RIGHT ||
- ! Back(5) != BACK){
- R(1);D(2);F(1);D(1);F(-1);D(2);R(-1);
- }
- ! else if(Back(3) != BACK ||
- ! Left(5) != LEFT){
- B(1);D(2);R(1);D(1);R(-1);D(2);B(-1);
- }
- ! else if(Left(3) != LEFT ||
- ! Front(3) != FRONT){
- L(1);D(2);B(1);D(1);B(-1);D(2);L(-1);
- }
- return(False);
- *** layer3.c Tue Apr 13 11:16:09 1993
- --- layer3.c.02 Mon May 24 10:19:41 1993
- ***************
- *** 292,298 ****
- /* A solution(3 to 5 to 7 to 3) */
- B(2);D(1);R(-1);L(1);B(2);R(1);L(-1);D(1);B(2);
- }
- ! else if(Right(7) == LEFT || Bottom(5) == LEFT){
- /* bottom(5) belongs in bottom(3) */
- /* B solution(5 to 3 to 7 to 5) */
- B(2);D(-1);R(-1);L(1);B(2);R(1);L(-1);D(-1);B(2);
- --- 292,298 ----
- /* A solution(3 to 5 to 7 to 3) */
- B(2);D(1);R(-1);L(1);B(2);R(1);L(-1);D(1);B(2);
- }
- ! else if(Right(7) == LEFT || Bottom(5) == LEFT){
- /* bottom(5) belongs in bottom(3) */
- /* B solution(5 to 3 to 7 to 5) */
- B(2);D(-1);R(-1);L(1);B(2);R(1);L(-1);D(-1);B(2);
- ***************
- *** 305,321 ****
- if(Back(7) == FRONT || Bottom(7) == FRONT){
- /* bottom(7) belongs in bottom(1) */
- /* A solution(7 to 1 to 5 to 7) */
- ! L(2);D(1);F(-1);B(1);L(2);F(1);B(-1);D(1);L(2);
- }
- else if(Front(7) == BACK || Bottom(1) == BACK){
- /* bottom(1) belongs in bottom(7) */
- /* B solution(1 to 7 to 5 to 1) */
- ! L(2);D(-1);F(-1);B(1);L(2);F(1);B(-1);D(-1);L(2);
- }
- else{ ; } /* all edges in proper place */
- }
-
- ! else if(Right(7) == RIGHT || Bottom(3) == RIGHT){
- /* bottom(5) ok */
- if(Front(7) == BACK || Bottom(1) == BACK){
- /* bottom(1) belongs in bottom(7) */
- --- 305,321 ----
- if(Back(7) == FRONT || Bottom(7) == FRONT){
- /* bottom(7) belongs in bottom(1) */
- /* A solution(7 to 1 to 5 to 7) */
- ! R(2);D(1);F(-1);B(1);R(2);F(1);B(-1);D(1);R(2);
- }
- else if(Front(7) == BACK || Bottom(1) == BACK){
- /* bottom(1) belongs in bottom(7) */
- /* B solution(1 to 7 to 5 to 1) */
- ! R(2);D(-1);F(-1);B(1);R(2);F(1);B(-1);D(-1);R(2);
- }
- else{ ; } /* all edges in proper place */
- }
-
- ! else if(Right(7) == RIGHT || Bottom(5) == RIGHT){
- /* bottom(5) ok */
- if(Front(7) == BACK || Bottom(1) == BACK){
- /* bottom(1) belongs in bottom(7) */
- ***************
- *** 330,336 ****
- else{ ; } /* all edges in proper place */
- }
-
- ! else if(Back(7) == BACK || Bottom(3) == BACK){
- /* bottom(7) ok */
- if(Right(7) == LEFT || Bottom(5) == LEFT){
- /* bottom(5) belongs in bottom(3) */
- --- 330,336 ----
- else{ ; } /* all edges in proper place */
- }
-
- ! else if(Back(7) == BACK || Bottom(7) == BACK){
- /* bottom(7) ok */
- if(Right(7) == LEFT || Bottom(5) == LEFT){
- /* bottom(5) belongs in bottom(3) */
- ***************
- *** 352,363 ****
- /* D solution(1 to 3; 3 to 1; 5 to 7; 7 to 5) */
- F(1);L(1);D(1);L(-1);D(-1);F(2);R(-1);D(-1);R(1);D(1);F(1);
- }
- ! else if(Front(7) == BACK || Bottom(7) == BACK){
- /* bottom(1) belongs in bottom(7) */
- /* C solution(1 to 7; 7 to 1; 3 to 5; 5 to 3) */
- R(2);L(2);U(1);R(2);L(2);D(2);R(2);L(2);U(1);R(2);L(2);
- }
- ! else if(Front(7) == RIGHT || Bottom(5) == RIGHT){
- /* bottom(1) belongs in bottom(5) */
- /* D solution(1 to 5; 5 to 1; 3 to 7; 7 to 3) */
- R(1);F(1);D(1);F(-1);D(-1);R(2);B(-1);D(-1);B(1);D(1);R(1);
- --- 352,363 ----
- /* D solution(1 to 3; 3 to 1; 5 to 7; 7 to 5) */
- F(1);L(1);D(1);L(-1);D(-1);F(2);R(-1);D(-1);R(1);D(1);F(1);
- }
- ! else if(Front(7) == BACK || Bottom(1) == BACK){
- /* bottom(1) belongs in bottom(7) */
- /* C solution(1 to 7; 7 to 1; 3 to 5; 5 to 3) */
- R(2);L(2);U(1);R(2);L(2);D(2);R(2);L(2);U(1);R(2);L(2);
- }
- ! else if(Front(7) == RIGHT || Bottom(1) == RIGHT){
- /* bottom(1) belongs in bottom(5) */
- /* D solution(1 to 5; 5 to 1; 3 to 7; 7 to 3) */
- R(1);F(1);D(1);F(-1);D(-1);R(2);B(-1);D(-1);B(1);D(1);R(1);
- ***************
- *** 368,370 ****
- --- 368,371 ----
- }
-
- }
- +
- *** layer3twirl.c Thu May 20 11:26:41 1993
- --- layer3twirl.c.02 Thu May 20 14:21:13 1993
- ***************
- *** 51,57 ****
- Back(8) == BACK &&
- Left(8) == LEFT)
- return(True);
- !
- /* Here if not ok */
- /* Twirl corners */
- /* 3 possibilities:
- --- 51,57 ----
- Back(8) == BACK &&
- Left(8) == LEFT)
- return(True);
- !
- /* Here if not ok */
- /* Twirl corners */
- /* 3 possibilities:
- ***************
- *** 62,68 ****
- * The twirl algorithm twirls one corner clockwise, and another anti-clockwise.
- * This is repeated until all 4 corners are correct.
- */
- !
- /* Find a corner that needs a clockwise twirl.
- * (Note: all corners are in correct position.
- * A corner needs a clockwise twirl if the front matches the top with
- --- 62,68 ----
- * The twirl algorithm twirls one corner clockwise, and another anti-clockwise.
- * This is repeated until all 4 corners are correct.
- */
- !
- /* Find a corner that needs a clockwise twirl.
- * (Note: all corners are in correct position.
- * A corner needs a clockwise twirl if the front matches the top with
- ***************
- *** 69,75 ****
- * said cube oriented in a top right-hand position.
- * A corner needs an anti-clockwise twirl if the right-hand face matches the top.)
- */
- !
- if(Front(6) == BOTTOM){
- L(-1);U(1);L(1);F(1);U(1);F(-1);
- /* Now search for cube that needs an anti-clockwise turn. */
- --- 69,75 ----
- * said cube oriented in a top right-hand position.
- * A corner needs an anti-clockwise twirl if the right-hand face matches the top.)
- */
- !
- if(Front(6) == BOTTOM){
- L(-1);U(1);L(1);F(1);U(1);F(-1);
- /* Now search for cube that needs an anti-clockwise turn. */
- ***************
- *** 83,89 ****
- F(1);U(-1);F(-1);L(-1);U(-1);L(1);
- D(2);
- }
- ! else if(Front(8) == BOTTOM){
- D(-1);
- F(1);U(-1);F(-1);L(-1);U(-1);L(1);
- D(1);
- --- 83,96 ----
- F(1);U(-1);F(-1);L(-1);U(-1);L(1);
- D(2);
- }
- ! else {
- ! /* This is the default case.
- ! * Here Front(8) == BOTTOM or there
- ! * are no other cubes that need an anti-clockwise turn.
- ! * No other cubes that need an anti-clockwise turn means
- ! * that we are in case 3 and 3 cubes
- ! * need a clockwise turn.
- ! */
- D(-1);
- F(1);U(-1);F(-1);L(-1);U(-1);L(1);
- D(1);
- ***************
- *** 101,107 ****
- R(1);U(-1);R(-1);F(-1);U(-1);F(1);
- D(2);
- }
- ! else if(Right(8) == BOTTOM){
- D(-1);
- R(1);U(-1);R(-1);F(-1);U(-1);F(1);
- D(1);
- --- 108,114 ----
- R(1);U(-1);R(-1);F(-1);U(-1);F(1);
- D(2);
- }
- ! else {
- D(-1);
- R(1);U(-1);R(-1);F(-1);U(-1);F(1);
- D(1);
- ***************
- *** 119,125 ****
- B(1);U(-1);B(-1);R(-1);U(-1);R(1);
- D(2);
- }
- ! else if(Back(6) == BOTTOM){
- D(-1);
- B(1);U(-1);B(-1);R(-1);U(-1);R(1);
- D(1);
- --- 126,132 ----
- B(1);U(-1);B(-1);R(-1);U(-1);R(1);
- D(2);
- }
- ! else {
- D(-1);
- B(1);U(-1);B(-1);R(-1);U(-1);R(1);
- D(1);
- ***************
- *** 137,143 ****
- L(1);U(-1);L(-1);B(-1);U(-1);B(1);
- D(2);
- }
- ! else if(Left(6) == BOTTOM){
- D(-1);
- L(1);U(-1);L(-1);B(-1);U(-1);B(1);
- D(1);
- --- 144,150 ----
- L(1);U(-1);L(-1);B(-1);U(-1);B(1);
- D(2);
- }
- ! else {
- D(-1);
- L(1);U(-1);L(-1);B(-1);U(-1);B(1);
- D(1);
-