Saturday, June 22, 2013

TIC TAC TOE Game in C lanugage

TIC TAC TOE using C

Again a game, I developed it when I was in my BCA second year.
Compiler I used is Turbo C++ , I know its old one but I used only this.
It is a well known game.......
I have a bug in this game. I am unable to determine the error cause.
Its giving me an error -
"Graphics error : Not enough memory to load driver"

The game runs fine for sometime but after playing 3-4 chances it gives this error and terminates automatically. Try playing the game if you like it please share it or if you have any solution comment below.



Instructions before you run the code:



Set BGI Graphics path in initgraph() function according to your pc's Trubo C BGI library.
Here mine is c:\\turboc3\\bgi



If your compiler's graphic library is not included then you will find many errors in this program.
To avoid this follow the steps:
1. Go to compiler's option menu (ALT+O)
2. Then select Linker option
3. Then select Libraries option
4. Then Mark X to Graphics Library option using space button
5. Then select OK

All done.
If you want to save this changes permanently then do this:
1. Go to Option menu
2. Select Save then select OK



Screen Shots:





Code:

Here is the code of the game copy and paste and follow the instructions and run the game.
Works fine.

1 comment:

Powered by Blogger.