make every game played store in a node and point to next game,
keep count,
when count reaches 10 or 20 ie. an increment by 10 save the last ten nodes and delete other.
how to delete:
traverse to start of count from tail and keep on deleteing
I really liked the idea of the file. So far I have leraned how to open a file and write on it and tehn open it. in this case I am not sure how it will work. I am working on it, any advise ?
if we need statistics of last 10 games, its quicker from result notation.
otherwise, program has to calculate result from move sequence.(and code have to be written for that)
I prefer the result of the game. I think it will be perfect if I can ad the new information to the same file instead of having another text file (for example total 10 files). but the problem is that i have not leraned about files and how to write in a file in a program like this.
the way i know is,
first, open the file by ifstream;
save the file to string arr[10];
edit arr[10];
close the file;
open the file by ofstream object;
save arr[10] to the file.
close the file.
but, is it possible to open the file in by fstream object and edit it?