コード例 #1
0
 private void CheckNextCardDealt()
 {
     GameInProgress = MyConstants.GameStatus.GameStartedSpadesLeft;
 }
コード例 #2
0
 private void CallSpades_Click(object sender, EventArgs e)
 {
     GameInProgress = MyConstants.GameStatus.GameStartedSpadesMe;
 }
コード例 #3
0
        private void pbMyCards_Click(object sender, EventArgs e)
        {
            switch (GameInProgress)
            {
            case MyConstants.GameStatus.GameInitialized:
                // new game starts
                btnNewGame.PerformClick();
                break;

            case MyConstants.GameStatus.GameStartNoSuit:
                // player selected lead suite
                string selectedCard = ((PictureBox)sender).Image.Tag.ToString();
                if (selectedCard.Contains("club"))
                {
                    MessageBox.Show("Žir je adut!");
                    GameInProgress           = MyConstants.GameStatus.GameStartedClubMe;
                    lblWhoCalledAndSuit.Text = "Ja sam zvao žira";
                }
                else if (selectedCard.Contains("diamond"))
                {
                    MessageBox.Show("Bundeva je adut!");
                    GameInProgress           = MyConstants.GameStatus.GameStartedDiamondMe;
                    lblWhoCalledAndSuit.Text = "Ja sam zvao bundevu";
                }
                else if (selectedCard.Contains("hearts"))
                {
                    MessageBox.Show("Srce je adut!");
                    GameInProgress           = MyConstants.GameStatus.GameStartedHeartsMe;
                    lblWhoCalledAndSuit.Text = "Ja sam zvao srce";
                }
                else if (selectedCard.Contains("spades"))
                {
                    MessageBox.Show("List je adut!");
                    GameInProgress           = MyConstants.GameStatus.GameStartedSpadesMe;
                    lblWhoCalledAndSuit.Text = "Ja sam zvao list";
                }
                //objNewGame.pl_Me.DidICall = true;
                //objNewGame.pl_LeftOponent.DidICall = false;
                //objNewGame.pl_MyTeammate.DidICall = false;
                //objNewGame.pl_RightOponent.DidICall = false;
                // show talon
                break;

            case MyConstants.GameStatus.GameStartedClubMe:     // move cards to the center of the playfield accordingly
                break;

            case MyConstants.GameStatus.GameStartedClubRight:
                break;

            case MyConstants.GameStatus.GameStartedClubMyPartner:
                break;

            case MyConstants.GameStatus.GameStartedClubLeft:
                break;

            case MyConstants.GameStatus.GameStartedDiamondMe:
                break;

            case MyConstants.GameStatus.GameStartedDiamondRight:
                break;

            case MyConstants.GameStatus.GameStartedDiamondMyPartner:
                break;

            case MyConstants.GameStatus.GameStartedDiamondLeft:
                break;

            case MyConstants.GameStatus.GameStartedHeartsMe:
                break;

            case MyConstants.GameStatus.GameStartedHeartsRight:
                break;

            case MyConstants.GameStatus.GameStartedHeartsMyPartner:
                break;

            case MyConstants.GameStatus.GameStartedHeartsLeft:
                break;

            case MyConstants.GameStatus.GameStartedSpadesMe:
                break;

            case MyConstants.GameStatus.GameStartedSpadesRight:
                break;

            case MyConstants.GameStatus.GameStartedSpadesMyPartner:
                break;

            case MyConstants.GameStatus.GameStartedSpadesLeft:
                break;
            }
        }
コード例 #4
0
 private void CallDiamonds_Click(object sender, EventArgs e)
 {
     GameInProgress = MyConstants.GameStatus.GameStartedDiamondMe;
 }
コード例 #5
0
 private void Form1_Load(object sender, EventArgs e)
 {
     myCtrlInitialization();
     GameInProgress = MyConstants.GameStatus.GameInitialized;
 }