Search:

Type: Posts; User: jps

Search: Search took 0.17 seconds.

  1. Replies
    6
    Views
    5,229

    Re: Tic-Tac-Toe array Win Check

    @ Icetaller
    Hi and welcome. Please read the problem with spoonfeeding.
  2. Replies
    6
    Views
    5,229

    Re: Tic-Tac-Toe array Win Check

    Well with 8 maximum possible cases, even brute force is fast...

    0 1 2
    3 4 5
    6 7 8

    if ( winOn(0 1 2) ) { //top row wins }
    if ( winOn(3 4 5) ) { //mid row wins }
    if ( winOn(6 7 8) ) { //low...
  3. Replies
    6
    Views
    5,229

    Re: Tic-Tac-Toe array Win Check

    Think of how many ways to win.
    3 horizontal wins
    3 vertical wins
    2 diagonal wins

    Does your method check each possibility?
Results 1 to 3 of 3