#include "endgame.h" /* returns a 1 in each winning position: the rows occupy positions 0 to BOARDLENGTH-1 cols BOARDLENGTH to 2*BOARDLENGTH-1 diags 2*BOARDLENGTH to 4*BOARDLENGTH-1 if game is not over, then fuction returns 0 */ long endgame() { unsigned int win1=~0, win2=~0, win3=~0, win4=~0; long eg=0; int i,j; for (i=0; i