Thread: Super Tic Tac Toe

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,665
    > Heh - perhaps he's German?
    CamelCase gives me the hump
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  2. #2
    ...and never returned. StainedBlue's Avatar
    Join Date
    Aug 2009
    Posts
    168
    A few Other things

    1) why would you fill a "char" board with numbers? Also, you'll need a 2-d array.

    2) don't you think displaying the board in a "for" loop would be a lot more elegant?

    3) what is the condition to win for gigantic tic-tac-toe boards?

  3. #3
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,318
    My suggestion is that your checkWin function must be done with loops.
    Have a look at my post here:
    Connect 5 Algorithm in C

    Note that with a board larger than 3x3, it is always possible for the starting player to get 3 in a row without the other player being able to stop them. Are you sure that is the actual winning criteria? Perhaps something like Gomoku is what you're really writing?
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

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 Neural Network
    By glo in forum General AI Programming
    Replies: 4
    Last Post: 06-15-2008, 03:39 PM
  3. Help with Tic Tac Toe game
    By snef73 in forum C++ Programming
    Replies: 1
    Last Post: 04-25-2003, 08:33 AM
  4. Need some help with a basic tic tac toe game
    By darkshadow in forum C Programming
    Replies: 1
    Last Post: 05-12-2002, 04:21 PM
  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

Tags for this Thread