Annotation of 43BSDReno/games/chess/move.h, revision 1.1.1.1

1.1       root        1: /* header file for move generator hes 890318
                      2:    Modified: 890510 minor bug fixed in Newataks
                      3:              890606 NEWMOVE levels 1-6 */
                      4: 
                      5: #if (NEWMOVE >= 1)
                      6: extern short distdata[64][64];
                      7: extern short taxidata[64][64];
                      8: 
                      9: #define taxicab(a,b) taxidata[a][b]
                     10: #define distance(a,b) distdata[a][b]
                     11: 
                     12: extern void Initialize_dist();
                     13: #endif
                     14:   
                     15: #if (NEWMOVE >= 2)
                     16: struct sqdata {
                     17:   short nextpos;
                     18:   short nextdir;
                     19: };
                     20: extern struct sqdata posdata[3][8][64][64];
                     21: 
                     22: extern void Initialize_moves();
                     23: 
                     24: #define ataks(side,a)\
                     25: {\
                     26:   register short u,c,sq;\
                     27:   register struct sqdata *p;\
                     28:   short i,piece,*PL;\
                     29:   \
                     30:   for (u = 64; u; a[--u] = 0); \
                     31:   PL = PieceList[side];\
                     32:   for (i = 0; i <= PieceCnt[side]; i++)\
                     33:     {\
                     34:       sq = PL[i];\
                     35:       piece = board[sq];\
                     36:       c = control[piece];\
                     37:       p = posdata[side][piece][sq];\
                     38:       if (piece == pawn) {\
                     39:        u = p[sq].nextdir; /* follow captures thread */\
                     40:        while (u != sq) {\
                     41:          a[u] = ++a[u] | c;\
                     42:          u = p[u].nextdir;\
                     43:        }\
                     44:       }\
                     45:       else {\
                     46:        u = p[sq].nextpos;\
                     47:        while (u != sq) {\
                     48:           a[u] = ++a[u] | c;\
                     49:          if (color[u] == neutral)\
                     50:            u = p[u].nextpos;\
                     51:          else\
                     52:            u = p[u].nextdir;\
                     53:        }\
                     54:       }\
                     55:     }\
                     56: }
                     57: #endif
                     58: 
                     59: #if (NEWMOVE >= 3)
                     60: extern short PieceList[2][16];
                     61: 
                     62: extern int Sqatakd();
                     63: #endif
                     64: 
                     65: #if (NEWMOVE > 3)
                     66: extern short Kfield[2][64],PINVAL,control[7],hung[2],XRAY;
                     67: 
                     68: extern BRscan();
                     69: #endif
                     70: 
                     71: #if (NEWMOVE > 4)
                     72: #define valueQ 1100
                     73: 
                     74: extern short PieceCnt[2],value[7],svalue[64];
                     75: 
                     76: extern CaptureList();
                     77: #endif
                     78: 
                     79: #if (NEWMOVE > 5)
                     80: extern GenMoves();
                     81: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.