コード例 #1
0
ファイル: MainForm.cs プロジェクト: GrantDuan/Tractor_LAN
        private void ThisPlayer_PlayerShowedCards()
        {
            //擦掉上一把
            if (ThisPlayer.CurrentTrickState.CountOfPlayerShowedCards() == 1)
            {
                drawingFormHelper.DrawCenterImage();
                drawingFormHelper.DrawScoreImage();
            }

            string latestPlayer = ThisPlayer.CurrentTrickState.LatestPlayerShowedCard();
            int    position     = PlayerPosition[latestPlayer];

            if (latestPlayer == ThisPlayer.PlayerId)
            {
                drawingFormHelper.DrawMyShowedCards();
            }
            if (position == 2)
            {
                drawingFormHelper.DrawNextUserSendedCards();
            }
            if (position == 3)
            {
                drawingFormHelper.DrawFriendUserSendedCards();
            }
            if (position == 4)
            {
                drawingFormHelper.DrawPreviousUserSendedCards();
            }

            if (ThisPlayer.CurrentTrickState.NextPlayer() == ThisPlayer.PlayerId)
            {
                drawingFormHelper.DrawMyPlayingCards(ThisPlayer.CurrentPoker);
            }
        }