Results 1 to 13 of 13

Thread: Tic-Tac-Toe!

  1. #1
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default Tic-Tac-Toe!

    Well, a re-create of my old script. Alot, and i mean, Alot better! This took me a while, because i didn't want to waste useless lines like in my last script, So i tried making up methods, which worked.

    How To Use:

    When you first begin you will be given a player, It will be displayed at the Right of the game. "X" meaning Crosses and "O" meaning Naughts. When someone wins their' Combination will light up in Red and their' Score will become bold.

    Everytime you win, you will recieve two points. It's the same with the computer, too.

    When the board is full from a Tie both players will recieve 2 points. To play a New game after the board's full, a player has won, or if you don't like the way the game's going, Press the "New Game" button on the right.

    To position your player, Click on any of the "available" squares

    Features:

    I made the computer smart, at times.. Meaning it will, at random, try to defend you winning (If it didn't go for its own win).

    Known Errors:

    It lags a little (Only for a split seconds or less..). This is because it go's through about 5 while loops each time someone positions (You hardly notice this lag, though).

    Other than them i don't know if there are any more errors, please post them if you enquire one.

    Tic Tac Toe CHEAT:

    I added TicTacToe_Cheat for people who want the computer to be harder. The computer cheats in there nearly every game by taking 2 moves. Also, in both games, the higher you get your score the more will be added on the next win You can still win, though.

    Enjoy Tic Tac Toe!
    -XxKanexX

  2. #2
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Found another error: Sometimes the scores play up, The computer may get 4 points each win.. But i guess it keeps it even, as the Computer is quite easy to beat.

  3. #3
    Join Date
    Apr 2006
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nice script! Computer should be smarter!

  4. #4
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Goldec
    Nice script! Computer should be smarter!
    I'll see what i can do in the future I'm glad you liked it.

  5. #5
    Join Date
    May 2006
    Location
    So-Cal
    Posts
    60
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'd have to say this is pretty damned cool.

  6. #6
    Join Date
    May 2006
    Location
    West Coast
    Posts
    820
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Awesome Job Kane !... Have you ever thought of making an RPG in scar ?...

  7. #7
    Join Date
    Apr 2006
    Location
    I live in NH
    Posts
    611
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Cool script. The computer is soooo easy to beat lol. I did lose once cause it switches who you are every game I think. Nice work.

  8. #8
    Join Date
    May 2006
    Posts
    1,230
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    im gonna make a harder one, ok (uses ur form :P)

    AI will be extremely hard to beat

  9. #9
    Join Date
    Feb 2006
    Posts
    1,022
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by The_Rs_Monkey
    im gonna make a harder one, ok (uses ur form :P)

    AI will be extremely hard to beat
    If you mean

    Code:
    
    x| |x
     | |
    x| |
    
    
    Then dam, you'll be right.

  10. #10
    Join Date
    May 2006
    Posts
    1,230
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    well... who said the computer will win? its more like a cats game..

    i found this example of TicTacToe [Ai] in visual basic 6, im gonna try to convert, it was a well good code. i couldbt beet it

  11. #11
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    I could make it alot harder (Checking every single way that the player could go), At the moment it only checks the first one; And only sometimes moves there

    Quote Originally Posted by Rs_Monkey
    im gonna make a harder one, ok (uses ur form :P)

    AI will be extremely hard to beat
    Did i give you permission to use my form? No. Make your own, please.

    Edit: I added TicTacToe_Cheat for people who want the computer to be harder. The computer cheats in there nearly every game by taking 2 moves. Also, in both games, the higher you get your score the more will be added on the next win

  12. #12
    Join Date
    Mar 2006
    Posts
    43
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I really like this script.

    I have noticed though that the score updates after you click new game, so then the writing that is bold is your old score. I would be better if it updated first.

  13. #13
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeh, well clicking New Game resets the text So that's why it does that.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •