Stop messing about with script and job suspension. That's where your trouble lies.
script basically opens up a shell within a shell. You can open script session while you have stopped jobs, but it won't let you exit the shell it created if you have stopped jobs. The instance of your chess program you started before you started your script session will be the one in memory before you made the changes, thus you wont see the changes when you return to the "outer" shell. You probably either ran the command with an & at the end, like "chess &" and put it in the background, or you hit ctrl-z to pause the job at some point. Either way, I think you have a giant clusterf--- of jobs and script sessions (hence my item #1 and 2 from post 13).
Type "jobs" at the terminal and see what comes up. It might be something like
Code:
$ jobs
[1]+ Stopped ./a.out
Kill all of those. You kill by job number (the thing in [ ]), like so "kill %1". That kills job #1. Do that for all jobs, then exit that script with "exit" or ctrl-d. Keep doing this until all of your terminals close down and you're sitting at an empty desktop or login screen. Log in again in one terminal only. Do a "ps -f" to make sure you don't have any instances of your chess program running (you shouldn't if you actually logged out of all your shells/terminals). Your output should look similar to this:
Code:
$ ps -fu username
UID PID PPID C STIME TTY TIME CMD
username 4582 4581 0 17:17 pts/4 00:00:00 bash -i
username 4649 4582 0 17:26 pts/4 00:00:00 ps -fu username
Then, clean everything up, make your change, compile and run. Change it back, clean up, compile run. You should see the two different versions as you expect.