View Single Post
Old 09-6-2015, 12:21 AM   #29
sickufully
Sir Krisk
FFR Veteran
 
sickufully's Avatar
 
Join Date: Dec 2007
Location: Vic, Australia
Posts: 930
Default Re: [University - C++ Programming] Help With Assignment (Very Basic Stuff)

Well, I've done it backwards. I think. I'm assuming I'm pretty close now but I'm not sure what I need to change around.


Here's my code:
Code:
	* Initialise the tile map with appropriate ENTITY values
	*/
	MAP_BUFFER		tileMap;
	for (unsigned int row = 0; row < MAP_HEIGHT; row++)
	{
		if (row == 0 || row == 20) 
		{
			tileMap[row][0] = EMPTY; 
		}
		else
		{
			tileMap[row][1] = WALL;
		}

		for (unsigned int col = 0; col < MAP_WIDTH; col++)
		{
			if (col == 0 || col == 30) 
			{
				tileMap[row][col] = EMPTY;
			}
			else
			{
				tileMap[row][col] = WALL; 
			}
		}
	}
__________________
sickufully is offline   Reply With Quote