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

PHP encapsulation solution—use Suit type #131

Open
mrmanc opened this issue Nov 20, 2022 · 2 comments · May be fixed by #140
Open

PHP encapsulation solution—use Suit type #131

mrmanc opened this issue Nov 20, 2022 · 2 comments · May be fixed by #140
Assignees
Labels
Milestone

Comments

@mrmanc
Copy link
Member

mrmanc commented Nov 20, 2022

Is it possible for the $suit member to be of type Suit rather than type String? At the moment, I think the Suit class is just used as a place to store the array of suits. I’m thinking it should have a $name member (or perhaps $suitname) of type string, and then it could be used to provide a type to the member in PlayingCard. That’s the way we’ve done it in Java, but I don’t know if there’s a PHP reason not to do this 😃

Originally posted by @mrmanc in #128 (comment)

If this change is made it might need to be applied to other branches which have the Suit class too.

@mrmanc
Copy link
Member Author

mrmanc commented Nov 20, 2022

Since I’ve merged #128 I thought it was worth creating an issue to keep track of this.

@mrmanc mrmanc added the php label Nov 20, 2022
@mrmanc mrmanc added this to the Cohort Eight milestone Nov 20, 2022
@samwatkinson1 samwatkinson1 linked a pull request Nov 21, 2022 that will close this issue
@samwatkinson1 samwatkinson1 linked a pull request Nov 21, 2022 that will close this issue
@samwatkinson1
Copy link
Collaborator

Proposed changes in linked PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants