public Play(Pile fromPile, Card fromCard, Pile toPile) { _fromPile = fromPile; _fromPileCardIndex = fromPile.IndexOf(fromCard); _fromCard = fromCard; _toPile = toPile; Logger.Write(GenerateToString()); }
private string GenerateToString() { return(string.Format("{0}[{1},{2}]({3}) -> {4}[{5},{6}]({7})", Enum.GetName(typeof(PileType), _fromPile.PileType), _fromPile.PileIndex, _fromPile.IndexOf(_fromCard), _fromCard, _toPile.PileType, _toPile.PileIndex, _toPile.Count, _toPile.Count == 0? "empty": _toPile[_toPile.Count - 1].ToString())); }