mardi 13 juin 2017

Is it possible to store class data into an array in Python, then randomly pick a class from the array?

enemyArray = [Ork, Goblin]

class Ork:

    name = "Mountain Dweller"`
    health = 10
    armor = 1
    damage = 5


class Goblin:

    name = "Looter"
    health = 5
    armor = 0
    damage = 5




Aucun commentaire:

Enregistrer un commentaire