Worms -- OOP Redo  2016-01
Worms-Redo Project as a learning vehicle.
worms.h
Go to the documentation of this file.
1 
2 /* worms.h */
3 
4 #include <stdlib.h>
5 #include <string.h>
6 #include <unistd.h>
7 #include <time.h>
8 
9 #define random(x) (rand() % x)
10 #define isDigit(x) ('0' <= x && x <= '9')
11 #define min(a, b) ((a) < (b)? (a) : (b))
12 #define ESC '\033' // the ESCape char
13 #define CARROT '.' // a carrot is shown as a dot
14 
15 typedef struct {
16  int onec; // one character
17  int attr; // its color
18 } ASOG; // A Square On the Ground
19 
20 typedef enum {
22 } DIRECTION; // as numbers: 0 .. 7
23 /*@ unused! */
24 
25 #define mvCursor(y, x) move(y, x)
26 #define putChar(c) addch(c)
27 #define putString(s) addstr(s)
28 #define getChar() getch()
29 #define screenFlush() refresh()
30 #define screenClear() clear()
31 #define EOLN "\n" // End Of LiNe string
Definition: worms.h:21
Definition: worms.h:21
int onec
Definition: worms.h:16
Definition: worms.h:21
Definition: worms.h:21
Definition: worm.hpp:77
Definition: worms.h:21
DIRECTION
Definition: worms.h:20
Definition: worms.h:21
Definition: worms.h:21
int attr
Definition: worms.h:17