I'm trying to insert five java patterns like (Command pattern, Decorator, Factory, Facade, Iterator) in my java game. Now i have modified an existing TETRIS game to a better one. Notice that i worked about 3 weeks to modify this game but now i need to insert into the code these patterns. If there is anyone that can help me with my problem I will be glad to discuss with.
A scrap from my first pattern
public class Decorator extends JComponent {
public Decorator(JComponent c) {
setLayout(new BorderLayout());
add("Center", c);
}
}
public class CoolDecorator extends Decorator {
JComponent thisComp;
public CoolDecorator(JComponent c) {
super(c);
c.setBackground(Color.white); }
}
If anyone can help me in private I will be glad to pay it.