/// <summary> /// Clones this instance. /// </summary> /// <returns></returns> public Cell Clone() { Cell c = new Cell(); if (this.HasCard) c.Card = this.Card.Clone(); return c; }
/// <summary> /// Checks to see if it is possible to move the specified <see cref="Card"/> to the specified <see cref="Cell"/>. /// </summary> /// <param name="card">The <see cref="Card"/> to check if its possible to move to the specified <see cref="Cell"/></param> /// <param name="cell">The destination <see cref="Cell"/> to hold the specified <see cref="Card"/></param> /// <returns><c>true</c> if the specified <see cref="Card"/> can be moved to the specified <see cref="Cell"/>; otherwise <c>false</c></returns> public virtual bool CanMoveToCell(Card card, Cell cell) { if (!EnforceRules) return true; if (!cell.HasCard) return true; return false; }
/// <summary> /// Initializes a new instance of the <see cref="GameCell"/> class. /// </summary> public GameCell(Cell cell) { InitializeComponent(); }