[Tutor] Changing what you've already printed

Ed Singleton singletoned at gmail.com
Wed Jun 22 14:24:59 CEST 2005


Is it possible (and easy) to change something you've already printed
rather than print again?

For example, if I'm making a little noughts and crosses game and I
print the board:

   |   |   
   |   |   
___|___|___
   |   |   
   |   |   
___|___|___
   |   |   
   |   |   
   |   |   

Then the computer has it's go, and rather than print the board out
again and have the previous empty board appear higher up, I want to
just add a X to the board I've already created.

Eg.


   |   |   
   |   |   
___|___|___
   |   |   
   | X |   
___|___|___
   |   |   
   |   |   
   |   |   

I've programs do this on the command line in Linux, so I assume it
must be possible.  (I don't mind making my programs Linux only so
that's not a problem).

Any clues or pointers to documentation gratefully recieved.

Thanks

Ed


More information about the Tutor mailing list