Пример #1
0
void wxSingleChoiceDialog::OnListBoxDClick(wxCommandEvent& WXUNUSED(event))
{
    DoChoice();
}
Пример #2
0
void wxSingleChoiceDialog::OnJoystickButtonDown(wxJoystickEvent& WXUNUSED(event))
{
    DoChoice();
}
Пример #3
0
void wxSingleChoiceDialog::OnOK(wxCommandEvent& WXUNUSED(event))
{
    DoChoice();
}
void PlayerMan::Update(float delta)
{
    PokerSequence sequence = m_pkPokerRule->GetCurPokerSequence();
    bool start = m_pkPokerRule->IsSequenceStart();

	 switch (sequence)
	 {
        case POKERSEQUENCE_START:
		{
			// 선을 정리한다.
			m_kPlayerManInfo.sunPlayerIndex = m_pkDealer->GetLastWinnerIndex();
			m_kPlayerManInfo.turnIndex = m_kPlayerManInfo.sunPlayerIndex;
			//m_pkOwner->AddMoney(10, 4000);
			break;
		}
		case POKERSEQUENCE_SHUFFLE:
		{
            if (start)
            {
                AlivePlayer();
                DoSchoolMoney();
            }
			static float fDelayTime = 0.0f;
			fDelayTime += delta;

			if (fDelayTime < 0.1f)
			{
				break;
			}
			fDelayTime = 0.f;
			break;
		}
		case POKERSEQUENCE_CHOICE:
		{
			DoChoice();
			break;
		}
        case POKERSEQUENCE_CHOICE_DONE:
        {
            AlivePlayer();
            CalcJokboResult();
            FindSun();
            m_kPlayerManInfo.turnIndex = m_kPlayerManInfo.sunPlayerIndex;
            break;
        }
        case POKERSEQUENCE_DEAL1_DONE:
        {
            CalcJokboResult();
            FindSun();
            m_kPlayerManInfo.turnCount = 0;
            m_kPlayerManInfo.turnIndex = m_kPlayerManInfo.sunPlayerIndex;
            bool myTurn = (m_kPlayerManInfo.turnIndex == m_kPlayerManInfo.curPlayerIndex);
            myTurn = false;
            m_akPokerPlayer[m_kPlayerManInfo.turnIndex].OnEnterTurn(myTurn);
            break;
        }
        case POKERSEQUENCE_BET1:
		{
			EachPlayerBetting(1, delta);
			break;
		}
        case POKERSEQUENCE_BET1_DONE:
        {
            AlivePlayer();
            break;
        }
        case POKERSEQUENCE_DEAL2_DONE:
        {
            CalcJokboResult();
            FindSun();
            m_kPlayerManInfo.turnCount = 0;
            m_kPlayerManInfo.turnIndex = m_kPlayerManInfo.sunPlayerIndex;
            bool myTurn = (m_kPlayerManInfo.turnIndex == m_kPlayerManInfo.curPlayerIndex);
            m_akPokerPlayer[m_kPlayerManInfo.turnIndex].OnEnterTurn(myTurn);
            break;
        }
        case POKERSEQUENCE_BET2:
		{
			EachPlayerBetting(2, delta);
			break;
		}
        case POKERSEQUENCE_BET2_DONE:
        {
            AlivePlayer();
            break;
        }
        case POKERSEQUENCE_DEAL3_DONE:
        {
            CalcJokboResult();
            FindSun();
            m_kPlayerManInfo.turnCount = 0;
            m_kPlayerManInfo.turnIndex = m_kPlayerManInfo.sunPlayerIndex;
            bool myTurn = (m_kPlayerManInfo.turnIndex == m_kPlayerManInfo.curPlayerIndex);
            m_akPokerPlayer[m_kPlayerManInfo.turnIndex].OnEnterTurn(myTurn);
            break;
        }
        case POKERSEQUENCE_BET3:
		{
			EachPlayerBetting(3, delta);
			break;
		}
        case POKERSEQUENCE_BET3_DONE:
        {
            AlivePlayer();
            break;
        }
        case POKERSEQUENCE_DEAL4_DONE:
        {
            // Bet3 중에 플레이어가 Die할 수도 있음 그래서 선이 바뀔수도 있음.
            CalcJokboResult();
            FindSun();
            m_kPlayerManInfo.turnCount = 0;
            m_kPlayerManInfo.turnIndex = m_kPlayerManInfo.sunPlayerIndex;
            bool myTurn = (m_kPlayerManInfo.turnIndex == m_kPlayerManInfo.curPlayerIndex);
            m_akPokerPlayer[m_kPlayerManInfo.turnIndex].OnEnterTurn(myTurn);
            break;
        }
        case POKERSEQUENCE_BET4:
		{
			EachPlayerBetting(4, delta);
			break;
		}
        case POKERSEQUENCE_OPEN:
		{
			if (start) {
				CalcJokboResultLast();
			}
			break;
		}
        case POKERSEQUENCE_END:
		{
			if (start)
			{
                m_kPlayerManInfo.turnCount = 0;
				ClearPlayerIndex();
				ClearBettingInfo();
				// RemoveDisconnecter();

				// // 변화의 요인이 없으면 계속 간다.
				// // 다른 플레이어들이 다 나가면 멈춰서 대기한다.
				// // 새로 들어왔으면 넣어준다.

				// AddPlayer();
			}
			break;
		}

        default:
            break;
	}
}