Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Noughts and Crosses game (complete programme)

Author
Message
Philip
23
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 21st Jun 2003 13:40
I've written a short and fairly basic Noughts and Crosses game.

I thought I'd post it here and everyone is welcome to use it, adapt it, re-write it, make it better, etc. etc.

Cheers

Philip
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 21st Jun 2003 14:46
dam it
i was writting one

oh well

Reset
Shadow
23
Years of Service
User Offline
Joined: 17th Oct 2002
Location: In the shadows
Posted: 21st Jun 2003 19:55
I can't play it, so tell me, did you manage to make the computer unbeatable yet?

I almost did it on mine.
haXor
23
Years of Service
User Offline
Joined: 12th May 2003
Location: United States
Posted: 21st Jun 2003 20:16
yah, its un beatable. Good job. and this isnt exactly basic, the AI is as good as it can get. keep up the good work.
~haXor

Sup Kids
Philip
23
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 23rd Jun 2003 17:14
Hey, thanks guys.

I think my code should theoretically mean that the computer cannot be beaten. I have played about 30 games with the final version (as posted) and so far its 27 draws and, er, 3 stupid losses by me (pressing the keypad keys too damn fast! LOL!)

Now my next task is going to be infinitely more ambitious. In fact, if it works, its going to be downright cool. Only slight problem is that it'll take months of my spare time. Oooh well....

Philip

Coming soon: Elite 2004 (Elite TNK port to DB Pro with a lot of new cool stuff added)

Philip
23
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 23rd Jun 2003 17:45
Actually, I spoke too soon.

I also posted the code to the Code snippets forum. Someone on there beat the computer with 5 - 3 - 9 - 1. That will happen every time because of the way the code fills up the next available horizontal space (its pretty basic in that respect).

Another chap kindly wrote an amendment to my code to fix that. The fix works but, without intending any offence to the chap, seems to have introduced a further bug.

I'll go back to the code at the weekend when I am not watching Wimbledon and fix the new bug.

Login to post a reply

Server time is: 2026-07-17 19:33:18
Your offset time is: 2026-07-17 19:33:18