Implement puzzle generation

This commit is contained in:
Camden Dixie O'Brien
2025-03-06 20:23:07 +00:00
parent 540a47c37b
commit 0561639aa6
3 changed files with 97 additions and 0 deletions

22
puzz.h Normal file
View File

@@ -0,0 +1,22 @@
/*
* Copyright (c) Camden Dixie O'Brien
* SPDX-License-Identifier: AGPL-3.0-only
*/
#ifndef PUZZ_H
#define PUZZ_H
#define WIDTH 10
#define HEIGHT 10
#define NMINES 10
#include <stdint.h>
enum { MINE = 0xff };
typedef uint8_t puzz_t[WIDTH][HEIGHT];
void gen(void);
void print(void);
#endif