Skip to content

Commit

Permalink
Randomized retrieval of reverse cards
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarcederberg committed Aug 3, 2021
1 parent ff8c55c commit dca57b3
Show file tree
Hide file tree
Showing 11 changed files with 201 additions and 133 deletions.
9 changes: 0 additions & 9 deletions Classes/ICard.cs

This file was deleted.

17 changes: 0 additions & 17 deletions Classes/IDeck.cs

This file was deleted.

15 changes: 0 additions & 15 deletions Classes/ISpread.cs

This file was deleted.

23 changes: 17 additions & 6 deletions Classes/TarotCard.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
namespace tarot{
public class TarotCard : ICard{
public enum Orientation{
Upright,
Reverse
}

public class TarotCard{
public readonly string Name;
public readonly string Keywords;
public readonly string KeywordsUpright;
public readonly string KeywordsReverse;

public TarotCard(string name, string keywords){
public TarotCard(string name, string keywordsUpright, string keywordsReverse){
this.Name = name;
this.Keywords = keywords;
this.KeywordsUpright = keywordsUpright;
this.KeywordsReverse = keywordsReverse;
}

public string GetName(){
return Name;
}

public string GetKeywords(){
return Keywords;
public string GetKeywords(Orientation orientation = Orientation.Upright){
if(orientation is Orientation.Upright){
return KeywordsUpright;
}else{
return KeywordsReverse;
}
}
}
}
2 changes: 1 addition & 1 deletion Classes/TarotDeck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public enum ShuffleType{
Riffle
}

public class TarotDeck : IDeck<TarotCard>{
public class TarotDeck{
public readonly List<TarotCard> Cards;

public TarotDeck(){
Expand Down
2 changes: 1 addition & 1 deletion Classes/TarotSpread.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;

namespace tarot{
public class TarotSpread : ISpread<TarotDeck, TarotCard>{
public class TarotSpread{
public readonly string[] Positions;

private TarotCard[] _spread_cards;
Expand Down
Loading

0 comments on commit dca57b3

Please sign in to comment.