/* <summary> * Adds a card to the pile * @param: Cards card * </summary> */ public override void AddToPile(Cards card) { if (cardList.Count == 0) { cardList.Add (card); } else { throw new NotImplementedException (); } }
/* <summary> * This method will accept a card <br> * A card will be inserted at the first <br> * position of a list * </summary> */ public void acceptCard(Cards card) { if (cardList.Count != 0) { cardList.Insert (0, card); } else { AddToPile (card); } }
/* <summary> * Get the bottom face up card * </summary> */ public static string getBottomFaceUp(Cards c) { return cardList.RemoveAt (0); }
/* <summary> * Get the top face up card * </summary> */ public static void getTopFaceUp(Cards c) { return cardList[cardList.Count - 1]; }
//will add a card to the pile public abstract void AddToPile(Cards card);