Search:

Type: Posts; User: Norm

Search: Search took 0.17 seconds.

  1. Re: Replacing an If statement with a Switch statement

    The array would contain the indexes of the winning positions. For the rows:

    int[][] winPos = new int[][] {{0,1,2}, {3,4,5}, etc}
    Then use those indexes to get to the board's contents:...
  2. Re: Replacing an If statement with a Switch statement

    Another approach would be to load an array with all the winning combinations and use it to search for winners.
Results 1 to 2 of 2