Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Westeros decks/cards #38

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

Westeros decks/cards #38

wants to merge 20 commits into from

Conversation

lmansur
Copy link
Member

@lmansur lmansur commented Feb 5, 2019

No description provided.

@lmansur lmansur mentioned this pull request Feb 5, 2019
@got-board-team got-board-team deleted a comment Feb 8, 2019
@got-board-team got-board-team deleted a comment Feb 8, 2019
@lmansur
Copy link
Member Author

lmansur commented Feb 22, 2019

We need to fix the westeros_cards yaml. Some cards are duplicate, so we have to duplicate them there.

@got-board-team got-board-team deleted a comment Feb 22, 2019
@got-board-team got-board-team deleted a comment Feb 22, 2019
@got-board-team got-board-team deleted a comment Feb 23, 2019
@got-board-team got-board-team deleted a comment Feb 23, 2019
@got-board-team got-board-team deleted a comment Aug 10, 2019
@got-board-team got-board-team deleted a comment Aug 10, 2019
available_positions = (1..deck.westeros_cards.size).to_a
deck.westeros_cards.each do |card|
new_position = random_position(available_positions)
card.update(revealed: false) if card.revealed?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a test for this if?

end
end

def create_cards
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you improve this method?

decks.each do |deck|
hide_previous_card(deck)
card = revealed_card(deck)
card.update(revealed: true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would make more sense to put this update inside revealed_card

@leandrost leandrost removed their request for review November 16, 2020 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants