Skip to content

Conversation

AnaghaSasikumar
Copy link
Contributor

Type object pattern implementation

@dfparker2002
Copy link

After reading the game article that inspired this addition, I would want to see how this pattern contribution is useful. May we see an effective extension of the breed-monster idea as candy.

How would we deliver the promise of the pattern; for example, overlay a rootbeer gummy into the base candy set to dynamically grow the candy set (monster) game?

@AnaghaSasikumar
Copy link
Contributor Author

AnaghaSasikumar commented Feb 11, 2019

I am not sure what you mean by how, so do let me know if this doesn't answer your question, but I think it's a change you could probably make in the json file, assuming that we only want some kind of change in the property of the candy and not some behavioural change, i.e. maybe having this overlay would make it have more points or something like that. What I understood from the pattern was that it makes that kind of thing easier, but there will be some trade-off when it comes to behaioural change, which can't be put in the json file. It is a pretty simple pattern, I was just attracted to the idea of being able to implement so many different "types" of object using a single class and just a json file.

@iluwatar iluwatar merged commit 0c6237c into iluwatar:master Jul 24, 2019
@iluwatar
Copy link
Owner

Good job @AnaghaSasikumar 👍

hoangnam2261 pushed a commit to hoangnam2261/java-design-patterns that referenced this pull request Jul 30, 2019
* typeobject pattern

* fixing errors

* fix error cellpool

* Update README.md

* Update README.md
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.

4 participants