my tic tac toe is done .. fear?

This is a discussion on my tic tac toe is done .. fear? within the Game Programming forums, part of the General Programming Boards category; Well, I just finished my tic tac toe game. It took a lot more lines then I thought it would ...

  1. #1
    Registered User
    Join Date
    Sep 2003
    Posts
    34

    my tic tac toe is done .. fear?

    Well, I just finished my tic tac toe game. It took a lot more lines then I thought it would (1290) but I'm glad I did it. As far as I can tell the AI is unbeatable. If you play it and manage to win please send me a PM and tell me how you did it.

    I wrote this in C using Dev-C++. It should be readable by just about anyone. The only thing is I wish I knew how to get rid of the million ifs I have. If you look through code and can give me some tips I would appreciate it. Thanks to everyone who helped me out.
    Attached Files Attached Files
    -gunder

    if (problem)
    postcount++;

  2. #2
    Registered User
    Join Date
    Sep 2003
    Posts
    34
    Oops, I found a couple bugs when I was playing around with it, everything should be fixed now. Here's the updated code. Sorry.
    Attached Files Attached Files
    -gunder

    if (problem)
    postcount++;

  3. #3
    Registered User axon's Avatar
    Join Date
    Feb 2003
    Location
    Mt. Prospect, IL
    Posts
    2,572
    I have beat your AI on the first try with the following combination of moves: (1a, 2b) (3b, 1c) (3a, 2a) (3c, .....)

    I think you should work on that a bit more...in tic tac toe there are no losers/winners only if a player makes a mistake...AI shouldn't make mistakes...anyways...there is only a limited number of moves, and if you figure out how to "turn" the board you can code it really quickly...anyhow...if you want some more challanging material trying designing a nine men's morris game!

    axon

    some entropy with that sink? entropysink.com

    there are two cardinal sins from which all others spring: Impatience and Laziness. - franz kafka

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 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
  2. tic tac toe crashes :(
    By stien in forum Game Programming
    Replies: 4
    Last Post: 05-13-2007, 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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21