public virtual void MoveTo(Column column) { // Si la carte est est déjà posée sur une colonne on la retire if (actualColumn != null) { actualColumn.RemoveCard(this); } column.AddCard(this); }
public void AddCardToAColumn() { Column column = new Column(); Card card = new Card(); column.AddCard(card); Assert.IsTrue(column.getCards().Contains(card)); Assert.IsTrue(column.Equals(card.getActualColumn())); }
internal virtual void setActualColumn(Column column) { actualColumn = column; }
/// <summary> /// Ajouter une colonne au board /// </summary> /// <param name="column"></param> public virtual void AddColumn(Column column) { columns.Add(column); }
/// <summary> /// Retirer une colonne au board /// </summary> /// <param name="column"></param> public virtual void RemoveColumn(Column column) { columns.Remove(column); }
/// <summary> /// Retire la carte "card" de la colonne "column" /// </summary> /// <param name="card"></param> /// <param name="column"></param> public void RemoveCardFromColumn(Card card, Column column) { column.RemoveCard(card); }
/// <summary> /// Ajoute la carte "card" à la colonne "column" /// </summary> /// <param name="card"></param> /// <param name="column"></param> public void PutCardOnColumn(Card card, Column column) { card.MoveTo(column); }