#include <Grid.h>
Public Member Functions | |
Grid (int, int) | |
bool | checkCoord (const Coord &) const |
Coord | randomCoord () const |
int | getMaxN () const |
int | getMaxE () const |
Public Attributes | |
const Die | die |
Some helper functions needed for the grid
bool Grid::checkCoord | ( | const Coord & | aCoord | ) | const |
check if some coordinates are inside the grid
int Grid::getMaxE | ( | ) | const |
get the number of squares along the y-axis. The squares are numbered 0 to maxY-1.
int Grid::getMaxN | ( | ) | const |
get the number of squares along the x-axis. The squares are numbered 0 to maxX-1.
Coord Grid::randomCoord | ( | ) | const |
produce a random location