Beispiel #1
0
 protected virtual void OnPartyEnded(JGPartyEndEventArgs e)
 {
     if (this.PartyEnd != null)
     {
         this.PartyEnd(this, e);
     }
 }
Beispiel #2
0
        public bool CheckMyRules(JGPlayer player)
        {
            //check for confidition
            if (this.Tour == 0)
            {
                JGHand hand = this.m_hands.GetHand(player);
                if (hand != null)
                {
                    enuJGExceptionRule c = hand.IsSevenRule() | hand.IsTweentyOneRule();
                    if (c != enuJGExceptionRule.None)
                    {
                        this.m_GameStart            = false;
                        this.m_gameHand.ControlUser = player;
                        this.Winner = player;
                        JGPartyEndEventArgs e = new JGPartyEndEventArgs();
                        e.Winner = Winner;
                        foreach (JGCard item in hand)
                        {
                            Console.WriteLine("CARD " + item);
                        }
                        switch (c)
                        {
                        case enuJGExceptionRule.None:
                            break;

                        case enuJGExceptionRule.Threeseven:
                            Console.Write("ThreeSEVEN RULE");

                            break;

                        case enuJGExceptionRule.FourSeven:
                            Console.Write("FourSEVEN RULE");
                            break;

                        case enuJGExceptionRule.TwentyOneRule:

                            Console.Write("TwentyOneRule RULE");
                            break;

                        default:
                            break;
                        }
                        e.Reason = (c != enuJGExceptionRule.None) ?  enuJGPartyEndReason.ExceptionRule : enuJGPartyEndReason.Normal;
                        e.Rule   = c;
                        OnPartyEnded(e);
                        return(true);
                    }
                }
            }
            return(false);
        }
Beispiel #3
0
        void m_party_PartyEnd(object sender, JGPartyEndEventArgs e)
        {
            switch (e.Reason)
            {
            case enuJGPartyEndReason.Normal:
                break;

            case enuJGPartyEndReason.ExceptionRule:
                break;

            default:
                break;
            }
        }
Beispiel #4
0
        void m_party_PartyBetEnd(object sender, JGPartyEndEventArgs e)
        {
            //
            switch (e.Reason)
            {
            case enuJGPartyEndReason.Normal:
                var t = (from s in this.m_profiles where (s != null) && s.Player == e.Winner select s).ToArray()[0];
                t.TableBalance += this.m_Pot;

                break;

            case enuJGPartyEndReason.ExceptionRule:

                break;

            default:
                break;
            }
        }