image.png

void ResetSpawnFlag() {
	static int spawnReadyTimer = 0;

	if (collisionFlag == true) {
		spawnReadyTimer++;
	}

	if (spawnReadyTimer >= 3) {
		spawnReadyTimer = 0;
		canSpawn = true;
		collisionFlag = false;

		CheckLines();
	}
}

구현방식 변경 : collisionFlag → collisionNumber

bool canSpawn = true;
int collisionNumber = 0;
		// 경계검사를 한다.
		if (!CheckBoundary(nextY, nextX)) {
			moveFlag = false;
			collisionNumber++;
			return;
		}

		// 이미 nextY, nextX에 블록이 있는지 검사한다.
		// 자기자신인지도 체크한다.
		pair<int, int> nextPosPair = make_pair(nextY, nextX);

		if (treeMap.find(nextPosPair) == treeMap.end() && grid[nextY][nextX] == 1) {
			moveFlag = false;
			collisionNumber++;
			return;
		}

여기서 블록 아래부분의 충돌이 4번발생시 블록을 재생성할 수 있게 한다.