Skip to content

PHP encapsulation solution—use Suit type #131

@mrmanc

Description

@mrmanc

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions