add class random massage

This commit is contained in:
jeremy
2020-04-25 21:24:48 +02:00
parent cdccc273bf
commit fdd4bc0e45
3 changed files with 28 additions and 1 deletions
+1
View File
@@ -7,6 +7,7 @@ from command_helper import CommandHelper
from trick import Trick
from scenario import intro
class AnonymousGoose:
def __init__(self):
self.should_exit = False
+3 -1
View File
@@ -34,12 +34,14 @@ class Trick(ABC):
from tricks.anim_ascii import AnimAsciiTrick
from tricks.reflection import ReflectionTrick
from tricks.rotation import RotationTrick
from tricks.random_message import RandomMessage
tricks = [
LaughingGooseTrick,
GlorifyGooseTrick,
AnimAsciiTrick,
ReflectionTrick,
RotationTrick
RotationTrick,
RandomMessage
]
return random.choice(tricks)()
+24
View File
@@ -0,0 +1,24 @@
from data.scenario_resource import random_text
from term_utils import Term
from trick import Trick
import random
class RandomMessage(Trick):
@property
def name(self):
return "RandomMessage"
@property
def delay(self):
return 5
@property
def is_reversible(self):
return False
def revert(self):
pass
def run(self):
randtext_term = Term()
randtext_term.print_creepy(random.choice(random_text))