After the user clicks on a square and either it is marked with an X or an error message is displayed, it is time for the computer to make a move. This is done using a very simple technique. It searches the board array for the first slot with a 0 in it. This marks an open space and it uses the setletter() function to put an O there. The slot number, in the loop index variable, is appended to the letter 'b' to make up the id of the cell that should be changed.