So I'm currently writing a roguelike game using only ascii characters, and I can't figure out how to check if there are walls in front of my characters (So ideally whatever method I use returns a '#'). My idea was to check after each move if the character is trying to move into a wall, but I can't find code that lets me check the specific character already printed out in the terminal at an (x, y) location.
Any help would be appreciated! I'm currently using
sys.stdout.write("\x1b7\x1b[%d;%df%s\x1b8" % (x, y, text))
to print characters at specific locations.