diff options
| author | Simon Tatham <anakin@pobox.com> | 2005-05-30 10:08:27 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2005-05-30 10:08:27 +0000 |
| commit | 6b9e690c89973e8e98de7dfc768849f0b8b411a0 (patch) | |
| tree | 0e776c25e300419011d8f5be831de802148a65ac /puzzles.h | |
| parent | 0f423f0b3a0bfaaac37fa2dba23794629088836f (diff) | |
| download | puzzles-6b9e690c89973e8e98de7dfc768849f0b8b411a0.zip puzzles-6b9e690c89973e8e98de7dfc768849f0b8b411a0.tar.gz puzzles-6b9e690c89973e8e98de7dfc768849f0b8b411a0.tar.bz2 puzzles-6b9e690c89973e8e98de7dfc768849f0b8b411a0.tar.xz | |
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]
Diffstat (limited to 'puzzles.h')
| -rw-r--r-- | puzzles.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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 |