mirror of
https://github.com/zoriya/AnonymousGoose.git
synced 2026-06-06 07:15: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 trick import Trick
|
||||||
from scenario import intro
|
from scenario import intro
|
||||||
|
|
||||||
|
|
||||||
class AnonymousGoose:
|
class AnonymousGoose:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.should_exit = False
|
self.should_exit = False
|
||||||
|
|||||||
@@ -34,12 +34,14 @@ class Trick(ABC):
|
|||||||
from tricks.anim_ascii import AnimAsciiTrick
|
from tricks.anim_ascii import AnimAsciiTrick
|
||||||
from tricks.reflection import ReflectionTrick
|
from tricks.reflection import ReflectionTrick
|
||||||
from tricks.rotation import RotationTrick
|
from tricks.rotation import RotationTrick
|
||||||
|
from tricks.random_message import RandomMessage
|
||||||
tricks = [
|
tricks = [
|
||||||
LaughingGooseTrick,
|
LaughingGooseTrick,
|
||||||
GlorifyGooseTrick,
|
GlorifyGooseTrick,
|
||||||
AnimAsciiTrick,
|
AnimAsciiTrick,
|
||||||
ReflectionTrick,
|
ReflectionTrick,
|
||||||
RotationTrick
|
RotationTrick,
|
||||||
|
RandomMessage
|
||||||
]
|
]
|
||||||
|
|
||||||
return random.choice(tricks)()
|
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