void setTrafficMem() { while (!positions.isEmpty()) { CityLocation pos = positions.pop(); mapX = pos.x; mapY = pos.y; assert city.testBounds(mapX, mapY); // check for road/rail int tile = city.getTile(mapX, mapY); if (tile >= ROADBASE && tile < POWERBASE) { city.addTraffic(mapX, mapY, 50); } } }