author | zecke <zecke> | 2004-04-30 13:27:34 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-04-30 13:27:34 (UTC) |
commit | b313bfcc63e972b1dfe059d91fe364d535478c7c (patch) (side-by-side diff) | |
tree | 36c52526da889598133698cb7c914fbe134c9594 | |
parent | 7829ac6b0577bf2398110f327a4b5e40435c105b (diff) | |
download | opie-b313bfcc63e972b1dfe059d91fe364d535478c7c.zip opie-b313bfcc63e972b1dfe059d91fe364d535478c7c.tar.gz opie-b313bfcc63e972b1dfe059d91fe364d535478c7c.tar.bz2 |
some long outstanding 'freeze' bug..
having a function pause(){} conflicts with linux version of pause. So instead
of doing nothing... we were forced to pause(2)
-rw-r--r-- | noncore/games/go/goplayutils.c | 2 | ||||
-rw-r--r-- | noncore/games/go/killable.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/noncore/games/go/goplayutils.c b/noncore/games/go/goplayutils.c index 9e2ce4c..91c6db2 100644 --- a/noncore/games/go/goplayutils.c +++ b/noncore/games/go/goplayutils.c @@ -887,65 +887,65 @@ short gx, gy, *savex, *savey; mark2 = playMark; tryPlay(plist3.p[i].px, plist3.p[i].py, me); libList[i] = gList[gMap[groupIDs[gx][gy]]].libC; if (libList[i] > treeLibLim) /* i'm safe */ { *savex = plist3.p[i].px; *savey = plist3.p[i].py; result = TRUE; goto one; } undoTo(mark2); } for (i = 1; i <= plist3.indx - 1; i++) for (j = i + 1; j <= plist3.indx; j++) if (libList[i] < libList[j]) { tl = libList[i]; libList[i] = libList[j]; libList[j] = tl; tp = plist3.p[i]; plist3.p[i] = plist3.p[j]; plist3.p[j] = tp; } } for (i = 1; i <= plist3.indx; i++) { *savex = plist3.p[i].px; *savey = plist3.p[i].py; if (legal[*savex][*savey]) { smark = playMark; tryPlay(*savex, *savey, me); - pause(); +//pause(); if (gList[gMap[groupIDs[*savex][*savey]]].libC > 1) if (gList[gMap[groupIDs[gx][gy]]].libC > treeLibLim) { restoreState(); /* sClearChar(sChar, rXor); */ return TRUE; } else if (gList[gMap[groupIDs[gx][gy]]].libC > 1) if (! killable(gx, gy, &gx1, &gx2)) { restoreState(); /* sClearChar(sChar, rXor); */ return TRUE; } undoTo(smark); } } result = FALSE; one: restoreState(); /* sClearChar(sChar, rXor); */ return result; } /* saveable */ /* marks unsavable groups as dead */ markDead() { /* markDead */ short i, j, gx, gy, result; #ifdef DEBUG printf( "markDead\n" ); diff --git a/noncore/games/go/killable.c b/noncore/games/go/killable.c index 3ed2d2e..23a133d 100644 --- a/noncore/games/go/killable.c +++ b/noncore/games/go/killable.c @@ -33,65 +33,65 @@ short x, y; if ((x < maxPoint) && (bord[x + 1][y] == 0)) n = n + 1; if ((y > 0) && (bord[x][y - 1] == 0)) n = n + 1; if ((y < maxPoint) && (bord[x][y + 1] == 0)) n = n + 1; return n; } /* mtNbrs */ short killTree(tx, ty, gx, gy, escape, tkMark) short tx, ty, gx, gy, *escape, tkMark; { /* killTree */ short curMark, mark2, mark3, i, j, k, tl, dStart, result; sPointList lList1, lList2; short libList[maxSPoint+1]; point tp; short esc = FALSE; tryCount = tryCount + 1; if (tryCount > tryLimit) { undoTo(tkMark); /* for (i = 1; i <= depth - 1; i++) { sClearChar(sChar, rXor); } */ depth = 1; return FALSE; } /* write(sChar); */ depth = depth + 1; curMark = playMark; tryPlay(tx, ty, me); /* try my move */ - pause(); +// pause(); if (gList[gMap[groupIDs[tx][ty]]].libC == 0) /* I'm dead */ { result = FALSE; goto one; } else if (killFlag) /* I killed something of his */ { result = TRUE; goto one; } else if (gList[gMap[groupIDs[gx][gy]]].libC > treeLibLim) /* safe */ { result = FALSE; goto one; } else { sSpanGroup(gx, gy, &lList1); /* find his liberties */ if (gList[gMap[groupIDs[tx][ty]]].libC == 1) /* he can kill me */ { if (lList1.indx < maxSPoint) /* add that option to his list */ { lList1.indx = lList1.indx + 1; spanGroup(tx, ty, &plist2); /* find my liberty */ lList1.p[lList1.indx].px = plist2.p[1].px; lList1.p[lList1.indx].py = plist2.p[1].py; } else { result = FALSE; goto one; } @@ -123,65 +123,65 @@ short tx, ty, gx, gy, *escape, tkMark; { mark2 = playMark; tryPlay(lList1.p[i].px, lList1.p[i].py, him); libList[i] = gList[gMap[groupIDs[gx][gy]]].libC; if ((libList[i] > treeLibLim) || ((libList[i] > (depthLimit - depth)) && (libList[i] > 2))) { *escape = TRUE; result = FALSE; goto one; } undoTo(mark2); } for (i = 1; i <= lList1.indx - 1; i++) for (j = i + 1; j <= lList1.indx; j++) if (libList[i] < libList[j]) { tl = libList[i]; libList[i] = libList[j]; libList[j] = tl; tp = lList1.p[i]; lList1.p[i] = lList1.p[j]; lList1.p[j] = tp; } } for (i = 1; i <= lList1.indx + 1; i++) /* try his responses */ { mark2 = playMark; if (i <= lList1.indx) /* try his move */ { tryPlay(lList1.p[i].px, lList1.p[i].py, him); /* play his response */ - pause(); +// pause(); if (gList[gMap[groupIDs[lList1.p[i].px] [lList1.p[i].py]]].libC < 2) goto two; /* a bogus move */ } else if (gList[gMap[groupIDs[gx][gy]]].libC <= 1) { result = TRUE; goto one; } if (gList[gMap[groupIDs[gx][gy]]].libC > treeLibLim) { *escape = TRUE; result = FALSE; goto one; } if (gList[gMap[groupIDs[gx][gy]]].libC > 1) { /* look at my responses */ sSpanGroup(gx, gy, &lList2); /* list his liberties */ dStart = lList2.indx + 1; if (adjInAtari) /* he wins */ { result = FALSE; goto one; } if ((lList2.indx > 2) && adj2Libs) /* he wins */ { result = FALSE; goto one; } for (k = 1; k <= maxSPoint; k++) libList[k] = -1; if (utilPlayLevel > 4) /* account for diagonal moves */ |