Skip to content

Commit

Permalink
fix(components): prioritize color of treasure higher than duration cards
Browse files Browse the repository at this point in the history
  • Loading branch information
GagaMen committed Jan 16, 2023
1 parent 40d03b0 commit a79a326
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/app/components/card/card.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ describe('CardComponent', () => {
typeIds: [CardTypeId.Action, CardTypeId.Duration, CardTypeId.Reaction],
expected: calculateColor(CardTypeId.Duration, CardTypeId.Reaction),
},
{
typeIds: [CardTypeId.Treasure, CardTypeId.Duration],
expected: calculateColor(CardTypeId.Treasure, CardTypeId.Duration),
},
{
typeIds: [CardTypeId.Action, CardTypeId.Reserve, CardTypeId.Victory],
expected: calculateColor(CardTypeId.Reserve, CardTypeId.Victory),
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/card/card.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ export class CardComponent {

get color(): string {
const orderedPrimaryCardTypes = [
CardTypeId.Duration,
CardTypeId.Treasure,
CardTypeId.Duration,
CardTypeId.Reserve,
CardTypeId.Victory,
CardTypeId.Reaction,
Expand Down

0 comments on commit a79a326

Please sign in to comment.