title: Find winner in a tic tac toe match
body: <p>I know people asked this before but I didn't understand the answers.</p>
  
  <p>Assume you have a <code>char board[3][3]</code> as a parameter in the function and that
  you need to return 1 if the X's won, -1 if the O's won or 0 if no one won yet OR if it's a tie.</p>
  
  <pre><code>int checkforwin(char board[3][3]);
  </code></pre>
  
  <p>that's the declaration for the function.</p>
  
  <p>Any idea for non primitive testing for winning by one of the opponents?</p>