From 8b16f595742106fe9542f09358c677131c62f0cb Mon Sep 17 00:00:00 2001 From: Bradley Small <vc.Bradley.Small@lowes.com> Date: Fri, 15 Nov 2019 08:20:33 -0500 Subject: [PATCH] adding unicode full block char, speed up sleep --- main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 702c94c..66dd6d9 100644 --- a/main.py +++ b/main.py @@ -16,13 +16,13 @@ class Cell: def __str__(self): """Cast to a string.""" if self.is_on(): - return "*" + return "\N{full Block}" return " " def __repr__(self): """Representation.""" if self.is_on(): - return "*" + return "\N{full Block}" return " " def is_on(self): @@ -82,7 +82,7 @@ class CellGrid: def show(self): """Display the grid.""" - time.sleep(1) + time.sleep(.5) print(chr(27) + "[2j") print("\033c") print("\x1bc") @@ -105,7 +105,7 @@ class CellGrid: def main(): """Drive the exercise.""" - grid = CellGrid() + grid = CellGrid(30,30) grid.setup([[4, 5], [5, 5], [6, 5], [7, 6], [7, 7], [7, 8]]) # grid.setup([[4, 5], [5, 5], [6, 5], [7, 5]]) -- GitLab