My best/messiest code so far (work in progress)
etian (32)

So as no one knows, for school I've been working on a tic tac toe game and its pretty fun! I tried doing some coding now but I look through all the code and its completely fine but I guess my home wifi is too laggy. :/

You are viewing a single comment. View All
Highwayman (1309)

@etian maybe. Not necessarily though. Don’t scare your self with strange words, most of it is quite simple.

an ansi escape code is basically anything that starts with '\e['. All it is is if you have a 'terminal emulator' or a 'video terminal', it interprets the stuff after '\e[' as a special command that is has to execute that does something. That thing can be changing the color of the text or changing the position of the cursor in the terminal or clearing the console... all sorts of things, and they all have to do with manipulation of the console screen.

system() is a function defined in the standard c library header (stdlib.h or cstdlib) and all it does is take your string that you pass it and send it as a command to the ... command processor? Idk, all I know is that it produces undefined behavior and that for it can take bash commands, so maybe command processor just means the shell?

When I say curses, I am referring to a group of header files (ncurses.h,curses.h,pcurses) that we’re created to provide a level of abstraction to manipulating the console and a certain level of portability.

system("CLEAR"); on some systems (hah) will clear the console.