Trying out a different dsiplay format.

This commit is contained in:
Simon Forman
2020-05-15 07:34:47 -07:00
parent 548709c87a
commit 76ac5eca94
2 changed files with 7 additions and 2 deletions
+5 -2
View File
@@ -130,9 +130,12 @@ class StackDisplayWorld(World):
if self.has(command) and self.check(command) == False: # not in {True, None}:
return
# print('\njoy?', command)
print(command)
self.print_command(command)
super(StackDisplayWorld, self).interpret(command)
def print_command(self, command):
print(command)
def print_stack(self):
print('\n%s <-' % stack_to_string(self.stack))
@@ -164,7 +167,7 @@ class StackWorld(StackDisplayWorld):
self.viewer.update_stack(self.stack)
def print_stack(self):
# StackDisplayWorld.print_stack(self)
print('%s . ' % stack_to_string(self.stack), end='')
if self.viewer:
self.viewer.update_stack(self.stack)