Donīt really know if I should post this here or in the game-programming board. But I make a try here and if it is wrong a mod can move it to gp.board. Anyway Im trying to code a simple(lame?) tetris clone using the glut-library.
I have a gridsystem(10X20) that indicates if a block is occupied or not. The problem is that some if-statemets are/"are not" evaluated, e.i

Code:
...
...
//DEBUG DEBUG DEBUG DEBUG
if (grid.moccupied[x1][y1-1] == true)
	std::cout << "UNDERLYING block is occupied(Block 1)" << std::endl << std::endl;
if (grid.moccupied[x2][y2-1] == true)
	std::cout << "UNDERLYING block is occupied(Block 2)" << std::endl << std::endl;
if (grid.moccupied[x3][y3-1] == true)
	std::cout << "UNDERLYING block is occupied(Block 3)" << std::endl << std::endl;
if (grid.moccupied[x4][y4-1] == true)
	std::cout << "UNDERLYING block is occupied(Block 4)" << std::endl << std::endl;

if ((grid.moccupied[x1][y1-1] == true) || (grid.moccupied[x2][y2-1] == true) 
|| (grid.moccupied[x3][y3-1] == true) || (grid.moccupied[x4][x4-1] == true))
			std::cout << "UNDERLYING BLOCK IS OCCUPIED" << std::endl;
...
...
How is it possible that the string "UNDERLYING BLOCK IS OCCUPIED" is printed to the screen and at the same time none of the preceding if-statements prints nothing??