26 lines
432 B
C
26 lines
432 B
C
/*
|
|
* 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];
|
|
typedef enum { DEAD, OK } status_t;
|
|
|
|
void gen(void);
|
|
void print(void);
|
|
status_t probe(int x, int y, puzz_t out);
|
|
int countadj(puzz_t field, int x, int y, uint8_t val);
|
|
|
|
#endif
|