Thread: Tic Tac Toe Simple Game Needed!

  1. #1
    x4000 Ruski's Avatar
    Join Date
    Jun 2002
    Location
    Outer Space!
    Posts
    542

    Exclamation Tic Tac Toe Simple Game Needed!

    I'm trying to create a simple Tic Tac Toe game in C++ for two players .. with the names inputs and stuff ... the board should not be like graphical ... simple text .. using x and o.
    Thanks

    (Please send the file in .cpp extension)

    what does signature stand for?

  2. #2
    Registered User
    Join Date
    Jun 2002
    Posts
    79
    Do not worry about the warnings here, they can be removed mainly by type casting.
    Compiler:Borland C++ 5.0

  3. #3
    Registered User
    Join Date
    May 2002
    Posts
    208
    You Could prolly try doing it yourself eh.
    At least try and when u run into a problem then post ur problem on here. Thats what I do I get tons of help from these boards but I at least throw a half decent atempt at it first.

  4. #4
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    can somoene please edit it so it works in dev c++ 4?
    Email: [email protected] || AIM: MisterSako || MSN: [email protected]

    -the shroom has spoken

  5. #5
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    ive tried to, but i kept getting errors for something else, its all becuase of one sleep command, ive tried to change it to something else, even deleting it! no matter wut ive tried to do it gets errors, thats why i wanted someone to convert it so it will work in dev c++ 4 so i can see wut it should look like in dev c++ 4
    Email: [email protected] || AIM: MisterSako || MSN: [email protected]

    -the shroom has spoken

  6. #6
    . Driveway's Avatar
    Join Date
    May 2002
    Posts
    469
    Code:
    #include <windows.h>
    #include <iostream.h>
    
    void sleep(int sleep_for)
    {
           int started = timeGetTime();
           for(;;)
          {
                int current = timeGetTime();
                if(current-sleep_for>=started)
                       break;
          }
    
    }
    
    
    int main()
    {
          cout<<"I am sleeping..."<<endl;
          sleep(1000);
          cout<<"I am done sleeping...."<<endl;
          sleep(1000);
          return 0;
    }

  7. #7
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    i know how to use the sleep command, but it is acting up inside the source!
    Email: [email protected] || AIM: MisterSako || MSN: [email protected]

    -the shroom has spoken

  8. #8
    . Driveway's Avatar
    Join Date
    May 2002
    Posts
    469
    Yes, that would work

  9. #9
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    line:213 message: implicit declaration of function 'int sleep(...)'
    Code:
    sleep(2);
    is on line 213
    Email: [email protected] || AIM: MisterSako || MSN: [email protected]

    -the shroom has spoken

  10. #10
    Registered User Dual-Catfish's Avatar
    Join Date
    Sep 2001
    Posts
    802
    You could try searching Planetsourcecode.com before you start posting messages here looking for programs..

    Edit: Meh, you could try this source I made awhile back when I was first learning C++.
    http://www.d2backstab.com/~dualcatfish/Tic Tac Toe.cpp
    Last edited by Dual-Catfish; 06-27-2002 at 08:30 PM.

  11. #11
    Registered User
    Join Date
    Jun 2002
    Posts
    79
    Here is the compiled TicTacToe program along with source code, in a zip file. The compiler used was Borland C++ 5.0.

  12. #12
    x4000 Ruski's Avatar
    Join Date
    Jun 2002
    Location
    Outer Space!
    Posts
    542
    Thanks for all those replies!
    But... sorry to say .. I dont use Borland C++ Compiler.
    I use Visual C++ ... But as soon as i found out that everyone of you uses Borland .. I think it's better than C++ , Right?
    Oh well .. i know there's a free version of Borland C++ on the net, and if you recommend it .. i'll go find it and use it
    Thanks.
    what does signature stand for?

  13. #13
    x4000 Ruski's Avatar
    Join Date
    Jun 2002
    Location
    Outer Space!
    Posts
    542
    Can somebody do it in Dev-C++ ? Please
    Thanks
    what does signature stand for?

  14. #14
    x4000 Ruski's Avatar
    Join Date
    Jun 2002
    Location
    Outer Space!
    Posts
    542

    Lightbulb Here's my idea...

    The reason i didnt do it because: I Dont Know How!!
    what does signature stand for?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. tic tac toe troubles...
    By mkylman in forum Game Programming
    Replies: 8
    Last Post: 09-16-2006, 06:44 PM
  2. tic tac toe AI roadblock >:-(|)
    By dark_rocket in forum Game Programming
    Replies: 5
    Last Post: 06-12-2006, 05:13 AM
  3. tic tac toe game
    By Leeman_s in forum Game Programming
    Replies: 9
    Last Post: 04-24-2002, 03:24 AM
  4. 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
  5. Replies: 22
    Last Post: 11-08-2001, 11:01 PM