I’m sitting at college making a noughts and crosses game while everyone else is learning the basics of Pascal. I can print the 2D array denoting the board into the terminal just fine, but what I want to do is update the board everytime a player adds a nought or cross, or moves their cursor around. To do this, I want to over-write the old board with the new one. Is there a way to move the console cursor up one line (Windoze console by the way), or can I clear the entire terminal in Pascal?
Thanks,
James
Ps. This is NOT homework.
Depending on what flavour of Pascal you are using you may be able to use
gotoxy(). Typically this will be in a Pascal UNIT such as CRT, so you’ll need aUSES CRT;at the start of your program, e.g.