for(int i = 0; i < MAP_HEIGHT; i++)
{
// Index the first column
for(int j = 0; j < MAP_WIDTH; i++)
In the j loop, you're doing i++ instead of j++
BTW you should only have one clear and one display in your game loop. For example: clear, process events, draw things, display