-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
58e5aa6
commit a295ea1
Showing
21 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace tarot{ | ||
public interface ISpread<T> where T : ICard{ | ||
public void AddCards(IEnumerable<T> cards); | ||
|
||
public string SerializeSpread(); | ||
|
||
public void PrintSpread(); | ||
|
||
public int Size(); | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace tarot{ | ||
public class TarotSpread : ISpread<TarotCard>{ | ||
private List<TarotCard> _spread; | ||
|
||
public TarotSpread(){ | ||
this._spread = new List<TarotCard>(); | ||
} | ||
|
||
public void AddCards(IEnumerable<TarotCard> cards){ | ||
this._spread.AddRange(cards); | ||
} | ||
|
||
public string SerializeSpread(){ | ||
return Utilities.Serialize<List<TarotCard>>(this._spread); | ||
} | ||
|
||
public void PrintSpread(){ | ||
foreach(TarotCard card in this._spread){ | ||
Console.WriteLine(card.ToString()); | ||
} | ||
} | ||
|
||
public int Size(){ | ||
return _spread.Count; | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.