사천성 만들기 실습(GetTickCount64() 사용)
카카오 프렌즈 카드를 이용한 사천성 만들기 실습

* GetTickCount64()
- 클락 틱 타임을 불러오는 함수
- 두번째 카드를 오픈 할때 틱 타임을 _timer 에 저장 해두고, 매치 되지 않았을 때 0.5초 지연
//지연
_timer = GetTickCount64();
if (GetTickCount64() - _timer > 500)//매칭 되지 않았을 때
{
if ((temp1 % 5) != (temp2 % 5))
{
card[temp1].open = false;
card[temp2].open = false;
//결과 초기화
temp1, temp2, count = 0;
}
}

* GetTickCount64()
- 클락 틱 타임을 불러오는 함수
- 두번째 카드를 오픈 할때 틱 타임을 _timer 에 저장 해두고, 매치 되지 않았을 때 0.5초 지연
//지연
_timer = GetTickCount64();
if (GetTickCount64() - _timer > 500)//매칭 되지 않았을 때
{
if ((temp1 % 5) != (temp2 % 5))
{
card[temp1].open = false;
card[temp2].open = false;
//결과 초기화
temp1, temp2, count = 0;
}
}
댓글
댓글 쓰기