랜덤블록 로직

#include <random>

BlockType GetRandomBlock() {
    // 난수 생성 엔진 초기화
    static std::random_device rd;
    static std::mt19937 gen(rd());
    std::uniform_int_distribution<int> dist(0, 6);  // 0~6 범위 난수

    int randomValue = dist(gen);
    return static_cast<BlockType>(randomValue);
}
int GetSpawnX(BlockType type) {
	switch (type) {
	case BlockType::BlockI:
		// I 블록은 폭이 4칸이므로 중앙 정렬 시 3으로 시작
		return 3;

	case BlockType::BlockO:
		// O 블록은 폭이 2칸
		return 4;

	case BlockType::BlockT:
		// T 블록 폭은 3칸
		return 3;

	case BlockType::BlockL:
		// L 블록 폭은 3칸
		return 3;

	case BlockType::BlockJ:
		// J 블록 폭은 3칸
		return 3;

	case BlockType::BlockS:
		// S 블록 폭은 3칸
		return 3;

	case BlockType::BlockZ:
		// Z 블록 폭은 3칸
		return 3;

	default:
		return 3;
	}
}