diff --git a/2024/14/solution.py b/2024/14/solution.py index 46a36d9..d079435 100644 --- a/2024/14/solution.py +++ b/2024/14/solution.py @@ -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() ######################################### diff --git a/__pycache__/fred.cpython-311.pyc b/__pycache__/fred.cpython-311.pyc index 4973a69..5a6813b 100644 Binary files a/__pycache__/fred.cpython-311.pyc and b/__pycache__/fred.cpython-311.pyc differ