Worms -- OOP Redo
2016-01
Worms-Redo Project as a learning vehicle.
Main Page
Related Pages
Classes
Files
File List
File Members
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
{
21
NORTH
,
NORTHEAST
,
EAST
,
SE
,
S
,
SW
,
W
,
NW
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
EAST
Definition:
worms.h:21
NORTHEAST
Definition:
worms.h:21
W
Definition:
worms.h:21
ASOG::onec
int onec
Definition:
worms.h:16
NW
Definition:
worms.h:21
NORTH
Definition:
worms.h:21
ASOG
Definition:
worm.hpp:77
SW
Definition:
worms.h:21
DIRECTION
DIRECTION
Definition:
worms.h:20
S
Definition:
worms.h:21
SE
Definition:
worms.h:21
ASOG::attr
int attr
Definition:
worms.h:17
Generated on Thu May 19 2016 15:14:16 for Worms -- OOP Redo by
1.8.11