I am coding a fun little text base game to get back into programming. Most of the code is in python but I'm only designing it for a dos console so I'm occasionally using dos commands via Pythons "os" module.
I want to be able to put a character to the console without "redrawing" the current screen line by line. I hoped there would be a command like "print []" but where it would not just create a new line, but instead let me specify exactly where on the screen I want to write a character or a string.
Scenario:
I print 3 options for the user to select. The first option has "*" by it to show that it is selected. If the user hits the down arrow key, the second option should now be selected. Instead of clearing the whole screen and re-printing all three options, but with the "*" now by the second option, I want to just "erase" the "*" by the first option, and "move" it to the second one, leaving everything else on the screen as it was.
I want to be able to put a character to the console without "redrawing" the current screen line by line. I hoped there would be a command like "print []" but where it would not just create a new line, but instead let me specify exactly where on the screen I want to write a character or a string.
Scenario:
I print 3 options for the user to select. The first option has "*" by it to show that it is selected. If the user hits the down arrow key, the second option should now be selected. Instead of clearing the whole screen and re-printing all three options, but with the "*" now by the second option, I want to just "erase" the "*" by the first option, and "move" it to the second one, leaving everything else on the screen as it was.
Comment