ZombieCPU/console.py

22 lines
597 B
Python
Raw Normal View History

2021-02-01 17:14:01 -05:00
#made by zombie
import numpy as np
class Console:
def __init__(self, memory=None):
self._memory = memory
def draw(self):
disp = np.empty([], dtype=str)
for i, value in enumerate(self._memory):
if i % 2 == 0: #only print text not color
if i % 50 == 0: #console size
disp = np.append(disp, str(int(value)))
print('\n')
else:
disp = np.append(disp, str(int(value)))
print(disp)