-
Notifications
You must be signed in to change notification settings - Fork 2
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
Create card struct #3
Comments
For wild and skip, color should just be What would you think of a Card.new(:wild)
#=> %Card{color: nil, number: :wild, value: 25}
Card.new(:seven, :blue)
#=> %Card{color: :blue, number: :seven, value: 5} And do we want to store values on the card or just get those with a function when we need values? |
I looked at the official rules and it looks like a skip is technically a blue card so you can play it that way for seven cards of one color. And wilds each have a color as well but it isn’t really important for anything but display. As far as the value though I think your idea makes sense since that’s really just a calculation based off of the number on the card. So I think the new function makes sense but we’ll want the color included every time. |
I guess the color wouldn’t necessarily need to be included if the first parameter is :skip but I don’t know if it’s worth making an exception for that particular case |
I didn't know that about skips What would you think about renaming |
Yeah I think value makes a lot more sense for that key |
We'll want to create a struct to represent a card.
I think these should have three keys:
The text was updated successfully, but these errors were encountered: