mirror of
https://github.com/zoriya/AnonymousGoose.git
synced 2026-05-23 18:55:38 +00:00
add class random massage
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)()
|
||||
|
||||
@@ -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))
|
||||
Reference in New Issue
Block a user