Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 8th, 2012  |  syntax: None  |  size: 0.75 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. bool chekWinner(int someArray[][[3]],int player)
  2. {
  3.     if (someArray[0][0] == player && someArray [0][1] == player  && someArray [0][2] == player)
  4.         return true;
  5.      if (someArray[0][0] == player && someArray [1][0] == player  && someArray [2][0] == player)
  6.         return true;
  7.      if (someArray[2][0] == player && someArray [2][1] == player  && someArray [2][2] == player)
  8.         return true;
  9.      if (someArray[0][2] == player && someArray [1][2] == player  && someArray [2][2] == player)
  10.         return true;
  11.      if (someArray[0][2] == player && someArray [1][1] == player  && someArray [2][0] == player)
  12.         return true;
  13.      if (someArray[0][0] == player && someArray [1][1] == player  && someArray [2][2] == player)
  14.         return true;
  15. }