Initial checkin of my Minesweeper clone, which uses a solver during

grid generation to arrange a mine layout that never requires guessing.

[originally from svn r5859]
This commit is contained in:
Simon Tatham
2005-05-30 10:08:27 +00:00
parent 0f423f0b3a
commit 6b9e690c89
6 changed files with 2742 additions and 13 deletions

View File

@ -176,6 +176,18 @@ random_state *random_init(char *seed, int len);
unsigned long random_bits(random_state *state, int bits);
unsigned long random_upto(random_state *state, unsigned long limit);
void random_free(random_state *state);
/* random.c also exports SHA, which occasionally comes in useful. */
typedef unsigned long uint32;
typedef struct {
uint32 h[5];
unsigned char block[64];
int blkused;
uint32 lenhi, lenlo;
} SHA_State;
void SHA_Init(SHA_State *s);
void SHA_Bytes(SHA_State *s, void *p, int len);
void SHA_Final(SHA_State *s, unsigned char *output);
void SHA_Simple(void *p, int len, unsigned char *output);
/*
* Data structure containing the function calls and data specific