ZombieCPU/console.py

21 lines
597 B
Python

#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)