Worms -- OOP Redo
2016-01
Worms-Redo Project as a learning vehicle.
|
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
Go to the source code of this file.
Classes | |
struct | ASOG |
struct | Worm::SEGMENT |
class | Worm |
class | WormInfo |
Macros | |
#define | asog(ptr, row, col) (ptr + row*asogCols + col) |
#define | CARROT '.' |
#define | COLOR_PAIR(x) (x) |
#define | ESC '\033' |
#define | isDigit(x) ('0' <= x && x <= '9') |
#define | MAXsegs 100 |
#define | min(a, b) ((a) < (b)? (a) : (b)) |
#define | NORTH 00 |
#define | random(x) (rand() % x) |
Functions | |
Worm * | findSlot () |
Variables | |
int | asogCols |
int | asogRows |
int | hxWorms |
WormInfo | worm_info [] |
Worm | wormArray [] |
int | xworms [] |
#define CARROT '.' |
Definition at line 14 of file worm.hpp.
Referenced by Worm::eatACarrot(), and sprinkleCarrots().
#define ESC '\033' |
Definition at line 13 of file worm.hpp.
Referenced by userControl().
#define MAXsegs 100 |
Definition at line 17 of file worm.hpp.
Referenced by Worm::createWorm().
#define min | ( | a, | |
b | |||
) | ((a) < (b)? (a) : (b)) |
Definition at line 12 of file worm.hpp.
Referenced by Worm::createWorm(), and userKeyPress().
#define random | ( | x | ) | (rand() % x) |
Definition at line 10 of file worm.hpp.
Referenced by Worm::createWorm(), Worm::live(), and userKeyPress().
Worm* findSlot | ( | ) |
Referenced by Worm::createWorm(), and Worm::sliceTheVictim().
int asogCols |
Definition at line 18 of file display.cpp.
Referenced by Worm::createWorm(), Worm::live(), showScreen(), and startCurses().
int asogRows |
Definition at line 18 of file display.cpp.
Referenced by Worm::createWorm(), Worm::live(), showScreen(), showWormsAndCarrots(), sprinkleCarrots(), startCurses(), and userControl().
int hxWorms |
Referenced by Worm::setVictimWorm(), showWormsAndCarrots(), and userControl().
WormInfo worm_info[] |
Definition at line 71 of file worm.hpp.
Referenced by Worm::createWorm(), Worm::eat(), Worm::isHungry(), showOneWorm(), and Worm::showOneWorm().
Worm wormArray[] |
Referenced by Worm::setVictimWorm().
int xworms[] |
Referenced by Worm::checkStomach(), Worm::createWorm(), Worm::gotEaten(), and Worm::sliceTheVictim().