Worms -- OOP Redo
2016-01
Worms-Redo Project as a learning vehicle.
|
#include "worm.hpp"
Go to the source code of this file.
Macros | |
#define | headSeg(wp) (wp->body + wp->nsegs) |
#define | xOf(wp) (headSeg(wp)->x) |
#define | yOf(wp) (headSeg(wp)->y) |
Variables | |
const int | dxa [] = { +0, +1, +1, +1, +0, -1, -1, -1 } |
const int | dya [] = { -1, -1, +0, +1, +1, +1, +0, -1 } |
const int | nextTurn [16] |
int | victimSegNum |
Worm * | victimWormp |
#define headSeg | ( | wp | ) | (wp->body + wp->nsegs) |
Definition at line 6 of file worm.cpp.
Referenced by Worm::createWorm(), Worm::isAt(), Worm::live(), Worm::shiftBodyDown(), showOneWorm(), and Worm::showOneWorm().
#define xOf | ( | wp | ) | (headSeg(wp)->x) |
Definition at line 7 of file worm.cpp.
Referenced by Worm::eatACarrot(), and Worm::setVictimWorm().
#define yOf | ( | wp | ) | (headSeg(wp)->y) |
Definition at line 8 of file worm.cpp.
Referenced by Worm::eatACarrot(), and Worm::setVictimWorm().
const int dxa[] = { +0, +1, +1, +1, +0, -1, -1, -1 } |
Definition at line 172 of file worm.cpp.
Referenced by Worm::live().
const int dya[] = { -1, -1, +0, +1, +1, +1, +0, -1 } |
Definition at line 173 of file worm.cpp.
Referenced by Worm::live().
const int nextTurn[16] |
Definition at line 175 of file worm.cpp.
Referenced by Worm::live().
int victimSegNum |
Definition at line 88 of file worm.cpp.
Referenced by Worm::eat(), and Worm::setVictimWorm().