diff options
Diffstat (limited to 'robots/cursesviewer.py')
-rw-r--r-- | robots/cursesviewer.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/robots/cursesviewer.py b/robots/cursesviewer.py index 434df47..4d94491 100644 --- a/robots/cursesviewer.py +++ b/robots/cursesviewer.py @@ -28,13 +28,13 @@ class CursesViewer: def draw_board(self, state): print(self.terminal.clear, end='') - width = len(state.board[0]) * 2 + width = len(state.board[0]) * 3 print(Box.TL + Box.H * width + Box.TR) for y, row in enumerate(state.board): output = [] for x, cell in enumerate(row): - value = ' ' + value = ' ' background = self.player_colours.get(cell['allegiance']) @@ -46,7 +46,7 @@ class CursesViewer: foreground = 'white' func = getattr(self.terminal, foreground) - value = func('<>') + value = func('<%d>') % energy if background: func = getattr(self.terminal, 'on_' + background) @@ -58,7 +58,7 @@ class CursesViewer: print(Box.BL + Box.H * width + Box.BR) def run(self): - limiter = rate_limit(10) + limiter = rate_limit(4) for state in self.game: next(limiter) |