uni

University stuff
git clone git://git.margiolis.net/uni.git
Log | Files | Refs | README | LICENSE

main.h (502B)


      1 #ifndef MAIN_H
      2 #define MAIN_H
      3 
      4 #if defined linux || defined __unix__ || defined __APPLE__
      5 #include <ncurses.h>
      6 #endif /* defined linux || defined __unix__ || defined __APPLE__ */
      7 #include <stdlib.h>
      8 
      9 #define YMAX(x) getmaxy(x)
     10 #define XMAX(x) getmaxx(x)
     11 
     12 typedef struct {
     13 	char **db;
     14 	char **mb;
     15 	int rows, cols;
     16 	int nmines, ndefused;
     17 	int gameover;
     18 	int x, y;
     19 	WINDOW *gw;
     20 } Board;
     21 
     22 extern Board b;
     23 
     24 void reset		(Board *b);
     25 void init_game	(Board *b);
     26 void clear_board(Board *b);
     27 
     28 #endif /* MAIN_H */