Nimbus
0.2
A game... with arrows... which should be clouds
|
#include <Grid.h>
Public Member Functions | |
Grid (int xLength, int yLength) | |
void | initialize (T value) |
void | erase () |
T | get (int posx, int posy) |
void | set (int posx, int posy, T value) |
int | getXDimension () |
int | getYDimension () |
std::string | str () |
Stores a grid of objects of type T. Provides basic 2d array niceties... etc.
|
inline |
Constructs a grid of the given x and y dimensions.
xLength | The X dimension of the grid |
yLength | The Y dimension of the grid |
|
inline |
Erases all the elements in the grid (though it may not delete them if they're pointers)
|
inline |
Gets element from location (x, y)
posx | The x position of the element |
posy | The y position of the element |
|
inline |
Gets the x dimension of the grid.
|
inline |
Gets the y dimension of the grid
|
inline |
Initializes the entire grid to the given value.
value | The value to which the entire grid should be initialized. |
|
inline |
Sets element to value at position (x, y)
posx | The x position of the element |
posy | The y position of the element |
value | The value to store in the given element |
|
inline |