Skip to content

Instantly share code, notes, and snippets.

@acwoss
Created June 1, 2018 11:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acwoss/d64cbb6f4b37e49cf78b20ae1f846637 to your computer and use it in GitHub Desktop.
Save acwoss/d64cbb6f4b37e49cf78b20ae1f846637 to your computer and use it in GitHub Desktop.
KlutzySuperClick created by acwoss - https://repl.it/@acwoss/KlutzySuperClick
from enum import Enum
class Jokenpo(Enum):
PEDRA = 1
PAPEL = 2
TESOURA = 3
@property
def weakness(self):
if self == self.PEDRA:
return self.PAPEL
elif self == self.PAPEL:
return self.TESOURA
else:
return self.PEDRA
print(Jokenpo.PEDRA.weakness)
print(Jokenpo.PAPEL.weakness)
print(Jokenpo.TESOURA.weakness)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment