mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-12 22:14:41 +00:00
https://github.com/iluwatar/java-design-patterns-web/issues/8 Update pattern categories and tags
This commit is contained in:
1 parent
0335c61512
commit
b2b1ba95eb
127 files changed
+282
-450
No files matched your search
@@ -3,10 +3,9 @@ layout: pattern
|
||||
title: Subclass Sandbox
|
||||
folder: subclass-sandbox
|
||||
permalink: /patterns/subclass-sandbox/
|
||||
categories: Other
|
||||
categories: Behavioral
|
||||
tags:
|
||||
- Java
|
||||
- Difficulty-Beginner
|
||||
- Game programming
|
||||
---
|
||||
|
||||
## Intent
|
||||
@@ -19,13 +18,10 @@ The subclass sandbox pattern describes a basic idea, while not having a lot of d
|
||||
The Subclass Sandbox pattern is a very simple, common pattern lurking in lots of codebases, even outside of games. If you have a non-virtual protected method laying around, you’re probably already using something like this. Subclass Sandbox is a good fit when:
|
||||
|
||||
- You have a base class with a number of derived classes.
|
||||
|
||||
- The base class is able to provide all of the operations that a derived class may need to perform.
|
||||
|
||||
- There is behavioral overlap in the subclasses and you want to make it easier to share code between them.
|
||||
|
||||
- You want to minimize coupling between those derived classes and the rest of the program.
|
||||
|
||||
## Credits
|
||||
|
||||
* [Game Programming Patterns - Subclass Sandbox]([http://gameprogrammingpatterns.com/subclass-sandbox.html](http://gameprogrammingpatterns.com/subclass-sandbox.html))
|
||||
* [Game Programming Patterns - Subclass Sandbox]([http://gameprogrammingpatterns.com/subclass-sandbox.html](http://gameprogrammingpatterns.com/subclass-sandbox.html))
|
||||
Reference in new issue
Block a user