I would like to use a constant that I created in one enum as an attribute of another, for example:
from enum import Enum
class Jokenpo(Enum):
PEDRA = ('Rock', [Jokenpo.PAPEL], [Jokenpo.TESOURA])
PAPEL = ('Paper', [Jokenpo.TESOURA], [Jokenpo.PEDRA])
TESOURA = ('Scissors', [Jokenpo.PEDRA], [Jokenpo.PAPEL])
def __init__(self, nome, fraco, forte):
self.nome = nome
self.fraco = fraco
self.forte = forte
In a stone-paper-scissors game, to specify what stone loses for paper but wins scissors I can do something like that. Probably my enum has some errors, I'm a beginner, but can you use a constant within another?