factory pattern screen fill(( )obj draw(pygame display flip(how much easier would it be to adapt this piece of code above to change from square to circleor to any other shape or image you might wantsome advocates of the factory method suggest that all constructors should be private or protected since it should not matter to the user of the class whether new object is created or an old one recycled the idea is that you decouple the request for an object from its creation this idea should not be followed as dogmabut try it out in one of your own projects and see what benefits you derive from it once you are comfortable with using factory methodsand possibly factory patternsyou are free to use your own discretion in terms of the usefulness of the pattern in the project at hand whenever you add to your game new class that needs to be drawn on the screenyou simply need to change the factory(method what happens when we need different kinds of factoriesmaybe you would like to add sound effect factories or environmental elements versus player characters factoriesyou want to be able to create different types of factory sub-classes from the same basic factory the abstract factory when you want to create single interface to access an entire collection of factoriesyou can confidently reach for an abstract factory each abstract factory in the collection needs to implement predefined interfaceand each function on that interface returns another abstract typeas per the factory method pattern import abc class abstractfactory(object)__metaclass__ abc abcmeta @abc abstractmethod def make_object(self)return