Skip to content

Commit

Permalink
Bug fixes for escape mode and reversed origin
Browse files Browse the repository at this point in the history
  • Loading branch information
L3viathan committed May 7, 2017
1 parent 1f33f6d commit f4acd57
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aceto.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def step(self):
except IndexError:
cmd = ' ' # nop
self.log(1, cmd, end='') if cmd != ' ' else None
self.log(2, "\nMODE:", self.mode)
if self.mode == 'command':
method = self.commands.get(cmd, Aceto._nop)
method(self, cmd)
Expand Down Expand Up @@ -146,6 +147,7 @@ def step(self):
self.move()
elif self.mode == 'escape':
self.move()
self.mode = 'command'

def move(self, coords=None):
if coords is not None:
Expand Down Expand Up @@ -482,7 +484,7 @@ def _restart(self, cmd) -> 'O':
self.x, self.y = 0, 0
else:
length = 2**self.p
self.x, self.y = length-1, length-1
self.x, self.y = 0, length-1

def _getch(self, cmd) -> ',':
ch = getch()
Expand Down

0 comments on commit f4acd57

Please sign in to comment.