examples/grid/test-grid2D.cpp
author Dmitriy Morozov <morozov@cs.duke.edu>
Fri, 22 Feb 2008 18:29:43 -0500
branchar
changeset 66 6021ec481b1f
parent 5 ee9052408c40
permissions -rw-r--r--
Fixed Simulator not processing events correctly Event that is being processed needed to be removed from the queue while its own process() method ran.

#include "grid2D.h"
#include <iostream>

int main()
{
	Grid2D grid(40,60);
	int i = 0;
	for (int x = 0; x < 40; ++x)
		for (int y = 0; y < 60; ++y)
		{
			grid(x,y) = i++;
		}

	std::cout << grid(20,30) << std::endl;
	std::cout << grid << std::endl;
}