Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
adasq committed Dec 23, 2017
1 parent 30c88a4 commit 3a120fa
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/helpers/cards.helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ export function createCard(pattern: string): Card {
};
}

export function toString(card: Card): string {
return card.rank + card.suit;
}

export function createCards(input: number|string[] = null): Card[] {
if (typeof input === 'number') {
return _.chain(createDeck())
Expand Down Expand Up @@ -110,13 +106,6 @@ export function getTrumpPointsBySuit(suit: Suit): number {
}[suit];
}

export function haveCardsEqualColor(...cards: Card[]): boolean {
return !!_.chain(cards)
.map('suit')
.reduce((suit1: Suit, suit2: Suit) => (suit1 === suit2) ? suit1 : NaN)
.value();
}

export function getCardsByColor(cards: Card[], color: Suit): Card[] {
return _.chain(cards)
.filter((card: Card) => card.suit === color)
Expand Down

0 comments on commit 3a120fa

Please sign in to comment.