Added colors to 2024/14
This commit is contained in:
parent
f857e8cc24
commit
e1a780e728
@ -2,6 +2,7 @@
|
||||
import sys,time,re
|
||||
from pprint import pprint
|
||||
from termcolor import colored
|
||||
import secrets
|
||||
|
||||
sys.path.insert(0, '../../')
|
||||
from fred import get_re,loadFile,addTuples,flood_fill
|
||||
@ -24,11 +25,11 @@ def nprint(grid,pos=None,x=None,positions:list=None):
|
||||
print(x,end='')
|
||||
elif positions is not None:
|
||||
if (c,r) in positions:
|
||||
print(x,end='')
|
||||
print(colored(x,secrets.choice(['green','yellow','blue','magenta','white','red','cyan'])),end='')
|
||||
else:
|
||||
print(colored(grid[r][c],'red'),end='')
|
||||
print(' ',end='')
|
||||
else:
|
||||
print(colored(grid[r][c],'red'),end='')
|
||||
print(' ',end='')
|
||||
print()
|
||||
|
||||
#########################################
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user