Exemplo n.º 1
0
        /// <summary>
        /// newCard를 hand에 추가하는 메소드.
        /// hand의 handIdx에 newCard를 삽입한다.
        /// 삽입 후 handModified 이벤트를 호출한다.
        /// handIdx가 유효하지 않으면 예외 throw.
        /// </summary>
        /// <param name="newCard">새로 받은 Card</param>
        /// <param name="handIdx">hand에서의 Index</param>
        public void AddNewJokerCard(JokerCard newCard, int handIdx)
        {
            //만약 입력받은 handIdx가 유효하지 않으면 예외를 throw한다.
            if (handIdx >= hand.Count)
            {
                throw new Exception("Invalid handIdx");
            }

            AddHiddenCardAt(handIdx, newCard);
        }
Exemplo n.º 2
0
        public override bool Equals(object obj)
        {
            if (obj is JokerCard)
            {
                JokerCard obj_JokerCard = obj as JokerCard;

                if (this.idx == obj_JokerCard.idx)
                {
                    return(true);
                }

                return(false);
            }

            return(false);
        }
Exemplo n.º 3
0
 public ShownJokerCard(JokerCard card) : base(card)
 {
 }