Thread: Tic tac toe in cell phone HW prob

  1. #1
    Registered User
    Join Date
    Nov 2003
    Posts
    6

    Tic tac toe in cell phone HW prob

    Hello everyone, I hate to be a nuisance on my first post, but I have come to a dead end here! I need to be able to make the game say cat's game when no one wins, and I cannot figure out how to make it not screw up in single player. Any help would be greatly appreciated since I need to email it to my professor tonight!!! The code is an attached file, if you are having problems I will email you, my email is [email protected]

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    A simple way

    in check_win() run thru each square.

    Add up all those that have a X or 0. If this == 9 then a draw.




    PS Search for some other threads as to how to check for a winner.

    It can be done in about 10 lines with two loops.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  3. #3
    Registered User
    Join Date
    Nov 2003
    Posts
    6
    Thank you very much I shall do that!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C - access violation
    By uber in forum C Programming
    Replies: 2
    Last Post: 07-08-2009, 01:30 PM
  2. Help me with my simple Tic tac toe prog
    By maybnxtseasn in forum C Programming
    Replies: 2
    Last Post: 04-04-2009, 06:25 PM
  3. Tic Tac Toe... so close...
    By SlayerBlade in forum C Programming
    Replies: 14
    Last Post: 10-10-2005, 08:58 PM
  4. Help with Tic Tac Toe game
    By snef73 in forum C++ Programming
    Replies: 1
    Last Post: 04-25-2003, 08:33 AM
  5. my tic tac toe game, please try it
    By Leeman_s in forum C++ Programming
    Replies: 2
    Last Post: 04-14-2002, 05:16 PM