Here is a TCL 8.4/8.5 version that should be compatible with newer versions of TCL, if you decide to install a new one (a good idea security wise by the way).
caesar is almost perfect.
There is only one small detail that I can not solve.
It is about applying the rounding rule with the "round" function.
If you look at the values of Pedro
9 + 10 + 4 = 23
23/3 = 7.66
The final result of Pedro should be 8, not 7.
It can be fixed?
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks
Since the rank you read from the file is an integer you don't really need to format it to real cos when doing the average it won't matter if it was real or not.
Anyway, glad you sorted it out. De nada.
Once the game is over, the king and the pawn go back in the same box.
You're right, I've changed it back to -integer and it works fine.
I had changed it to -real because earlier it gave me an error of the type:
Tcl error: expected floating-point number but got "5.00 15.00 11.00 14.00 2.00".
I understood that a floating number was expected and got a list of floating numbers.
Now I changed it again as you advise me and it works ..
It's just that I made so many changes and tests that I forgot about the mistakes it gave me.
Thank you so much caesar
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks