#ifndef _COMMON_H_ #define _COMMON_H_ // The number of directions an object can move in const int NUM_DIRECTIONS = 4; // The directions, enumerated enum { N, E, S, W }; // A data structure to all the passing of locations struct Location { int x, y; }; // A struct for moves by pacmen and ghosts struct Move { Location from; Location to; }; int xChange (int dir); int yChange (int dir); int randomDirection (); int nextDir (int dir); int backDir (int dir); int prevDir (int dir); int expTen (int p); int digitVal (char c); bool coinFlip (); int randomBetween (int low, int high); template void Swap (T& a, T& b); #endif