Solved

Tic Tac Toe Game codes.

Posted on 2002-04-24
13
1,279 Views
Last Modified: 2012-06-27
Hi, Experts.
For shure one of You have the 'Tic Tac Toe' game codes( X / O ) , writen on Borland C.
I need this codes: the game should have ability to play for 2 players and the ability to play one player with a computer.

If You have this codes , just paste the comment that you have it and I will paste my email address.

If it will the good for me, I will give You more than 500 points.
Thanks, RRR.
0
Comment
Question by:RRR
  • 3
  • 3
  • 2
  • +3
13 Comments
 
LVL 4

Expert Comment

by:IainHere
ID: 6965285
Hi 3Rs.  You're not new here, so you know that doing homework is not allowed.

You know the drill - post what you have so far, and wait for constructive criticism.
0
 
LVL 3

Author Comment

by:RRR
ID: 6965308
I am just need the codes.
:)

RRR.
0
 
LVL 1

Expert Comment

by:bluprint
ID: 6970274
well, here's a two player you can download...

http://www.bloodshed.net/c/
0
ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

 
LVL 1

Expert Comment

by:bluprint
ID: 6970278
0
 
LVL 4

Expert Comment

by:IainHere
ID: 6970801
bluprint - try not to give people the answers to their homework questions.  As I pointed out above, this is not allowed, and can result in questioner *and* answerer being thrown off the site.

Not that I'm a moderator or anything, so feel free to ignore/flame me.

0
 
LVL 1

Expert Comment

by:bluprint
ID: 6971226
Respectfully, how do you know it's a homework assignment?
0
 
LVL 22

Expert Comment

by:Adam Leinss
ID: 6972869
Hmm, how did you get it to 500 points?  I can never set it above 200 points (use to with the old Expert-Exchange).

These links may give you some ideas:
http://www.ee.udel.edu/~six/Teaching/cisc10500f/assignments/project3/tictactoe.c

Here's a complete working one (Human vs. Human) with the C source: http://www.sftw.umac.mo/~robertb/courses/sftw120/solutions11.html

Not sure how Borland C differs from ANSI C.

This is actually a fun project to code (I did it in high school in Pascal)  It's relatively simple, because there is an algorithm where you will always tie the game.  This web site has a bit of info. on the general algorithm:

http://www.cs.colorado.edu/~zbergen/cs1300/tictactoe.html

There's a cool thing you can add such as having the program remember losing paths by setting negative values to the path it last took.  So it actually appears the program gets better as you play it more and more (assuming of course you don't program the tie-tie algorithm and just use the AI approach, otherwise it will always tie you).
0
 
LVL 33

Accepted Solution

by:
hongjun earned 500 total points
ID: 6973271
0
 
LVL 22

Expert Comment

by:Adam Leinss
ID: 6973458
hongjun: neat source code, do you know what the syntax for the moves are?  I tried x y and x,y, but nothing seems to work.  Alpha-beta pruning with tic-tac-toe, I've seen it all!
0
 
LVL 3

Author Comment

by:RRR
ID: 6976366
Thanks for all of you , experts.
I will try the codes and will paste my comments.
RRR.
0
 
LVL 3

Author Comment

by:RRR
ID: 6993236
Hi, All.
I accept the  hongjun's comments as answer because this  codes are optimal for me. Thanks for all of you.
RRR.
0
 

Expert Comment

by:chicokid
ID: 10319278
IainHere: everyone is just trying to help out.  I'm sure no one is looking simply for the answer to homework and those who are will loose out in the long run.
0
 
LVL 33

Expert Comment

by:hongjun
ID: 10319892
chicokid, can't imagine you posted a reply after almost 2 years.
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question