Your program will read k,m,n each on a separate line from stdin. The
program will redirect stdin to in.txt.  Below is pseudocode for shell
scripts and comments on input and output.  

#k,m,n are command-line arguments $k, $m, and $n respectively.
while ( student has not won, adversary has not  won, and board is not 
full ){
      cp real_board.txt board.txt
      player <in.txt >out.txt
      read the player's move from out.txt (a single integer)
      if the move is valid{ (i.e., within bounds and chosen square not 
already taken)
           update real_board.txt with new 'X' move;
           generate legal random 'O' move;
           update real_board with legal random move
      }
      else{ program incorrect; exit}
}

***INPUT***
The player program should start by reading k,m,n each followed by a 
newline from stdin.
For example, someone using C may write
scanf("%d\n", &k);
scanf("%d\n", &m);
scanf("%d\n", &n);
In the pseudocode  of the shell script you  notice stdin is redirected
to in.txt, I'm  enclosing a text file example for  in.txt in case this
is still not clear.

The  player will  read  the  board from  board.txt,  I'm attaching  an
example board.txt (for a 3-by-3 board).

***Output***
The  player  will  write  the   move  to  the  output  as  an  integer
representing the location  where to put an 'X'. 
A student using C might write:
printf("%d\n", choice);

You will notice  that in the script the player  is invoked with stdout
redirected to out.txt This should make no difference to the student.


