Combat game - character factory
The CharacterFactory class is created so that I'll be able to handle Orc and Human classes in a more abstract way or so.


You try to stay DRY which is very good, but this idea would be better represented with inheritance.

You could create a class Character() and let both Human and Orc, inherit from the super class like so:

class Character():
    def __init__(self, health, attack_damage, name):
        self.attack_damage = attack_damage
        self.health = health
        self.name = name

    def attack(self, target):
        target.health -= self.attack_damage

    def __str__(self):
        return f"Name: {self.name}\nDamage: {self.attack_damage}\nHealth: {self.health}\n"

class Human(Character):
    def __init__(self, name, health=105, attack_damage=45):
        super().__init__(health, attack_damage, name)

class Orc(Character):
    def __init__(self, name, health=100, attack_damage=50):
        super().__init__(health, attack_damage, name)

def main():
    orc = Orc("Karcsi")
    human = Human("Nojbejtoo")

    print(orc)
    print(human)

    orc.attack(human)
    print(human)

if __name__ == "__main__":
    main()


Things I changed:


Instead of an inspect function, I override the magic function __str__ so you can directly print(human) or print(orc)
The use of the if __name__ == '__main__'
And the snake_case functions main instead of Main
In the attack function body, see how a = a - b equals a -= b


I have omitted the GameState part, maybe someone else will pick that up.

Good luck with your game!