Testmodul.

This commit is contained in:
Olli Graf
2022-05-12 19:51:04 +02:00
parent fd3187e61e
commit 3b29f77d57
2 changed files with 32 additions and 0 deletions

21
TestModule.py Normal file
View File

@@ -0,0 +1,21 @@
import logging
import ActionModul
class TestModule:
def __init__(self, world):
logging.debug(f'** init Testmodule {world}')
self.world = world
self.actionmodul = ActionModul.ActionModul(world)
def testOeffneTruhe(self):
pcmd = self.world.parseInput('nimm Truhe')
self.actionmodul.rauf()
self.actionmodul.nimm(pcmd)
self.actionmodul.runter()
self.actionmodul.sued()

11
tomb.py
View File

@@ -1,6 +1,7 @@
#!/usr/bin/python3
import World
import ActionModul
import TestModule
import signal
import sys
import logging
@@ -91,6 +92,16 @@ def inputLoop(stdscr):
if debugcommand[1] == 'items':
debug_Items()
elif command.startswith('auto:'):
command = command.rstrip()
if command.startswith('auto:'):
debugcommand = command.split(':',1)
logging.debug(f'debugcommand: {debugcommand}')
testmodul = TestModule.TestModule(world)
if(debugcommand[1] == 'truhe'):
testmodul.testOeffneTruhe()
else: