home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
games
/
volume11
/
jotto
/
part01
/
isis.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-12-11
|
444b
|
26 lines
/*
* isis
*/
#include "jotto.h"
isis(guess, array, alen)
char *guess, *array[];
int alen;
{
int count[WORDLEN+1];
int i, retval, lim;
static int start = 0;
lim = alen<64? alen: 64;
for (i=0; i<=WORDLEN; i++) count[i] = 0;
for (i=0; i<lim; i++) {
start += 29;
if (start >= alen) start %= alen;
count[inter(guess, array[start])]++;
}
retval = 0;
for (i=0; i<=WORDLEN; i++) retval -= count[i]*blog(count[i]);
return retval;
}