Posted: 23rd Mar 2003 17:42
Prove me wrong (DBC, possibly pro, no media required)...

Old Code
+ Code Snippet
sync on
ink rgb(255,255,255),0
dim box(9)
do
   for x=1 to 3
      for y=1 to 3
         if turn=0 and mousex()>x*100 and mousex()<x*100+100 and mousey()>y*100 and mousey()<y*100+100 and mouseclick()=1 and box((x-1)*3+y)=0 then box((x-1)*3+y)=1:turn=1:inc players_go
         if box((x-1)*3+y)=1
            line x*100,y*100,x*100+100,y*100+100
            line x*100,y*100+100,x*100+100,y*100
         endif
         if box((x-1)*3+y)=2
            circle x*100+50,y*100+50,45
         endif
      next y
   next x

   if turn=1
   for x=1 to 3
      if str$(box(1+(x-1)*3))+str$(box(2+(x-1)*3))+str$(box(3+(x-1)*3))="022" then box(1+(x-1)*3)=2:goto win
      if str$(box(1+(x-1)*3))+str$(box(2+(x-1)*3))+str$(box(3+(x-1)*3))="202" then box(2+(x-1)*3)=2:goto win
      if str$(box(1+(x-1)*3))+str$(box(2+(x-1)*3))+str$(box(3+(x-1)*3))="220" then box(3+(x-1)*3)=2:goto win
   next x
   for y=1 to 3
      if str$(box(y))+str$(box(y+3))+str$(box(y+6))="022" then box(y)=2:goto win
      if str$(box(y))+str$(box(y+3))+str$(box(y+6))="202" then box(y+3)=2:goto win
      if str$(box(y))+str$(box(y+3))+str$(box(y+6))="220" then box(y+6)=2:goto win
   next y
   if str$(box(1))+str$(box(5))+str$(box(9))="022" then box(1)=2:goto win
   if str$(box(1))+str$(box(5))+str$(box(9))="202" then box(5)=2:goto win
   if str$(box(1))+str$(box(5))+str$(box(9))="220" then box(9)=2:goto win

   for x=1 to 3
      if str$(box(1+(x-1)*3))+str$(box(2+(x-1)*3))+str$(box(3+(x-1)*3))="011" then box(1+(x-1)*3)=2:goto moved
      if str$(box(1+(x-1)*3))+str$(box(2+(x-1)*3))+str$(box(3+(x-1)*3))="101" then box(2+(x-1)*3)=2:goto moved
      if str$(box(1+(x-1)*3))+str$(box(2+(x-1)*3))+str$(box(3+(x-1)*3))="110" then box(3+(x-1)*3)=2:goto moved
   next x
   for y=1 to 3
      if str$(box(y))+str$(box(y+3))+str$(box(y+6))="011" then box(y)=2:goto moved
      if str$(box(y))+str$(box(y+3))+str$(box(y+6))="101" then box(y+3)=2:goto moved
      if str$(box(y))+str$(box(y+3))+str$(box(y+6))="110" then box(y+6)=2:goto moved
   next y
   if str$(box(1))+str$(box(5))+str$(box(9))="011" then box(1)=2:goto moved
   if str$(box(1))+str$(box(5))+str$(box(9))="101" then box(5)=2:goto moved
   if str$(box(1))+str$(box(5))+str$(box(9))="110" then box(9)=2:goto moved

   if players_go=1
      if box(5)=1 then box(3)=2:goto moved:else:box(5)=2:goto moved
   endif
   if players_go=2
      if box(8)=1 and box(3)=1 then box(9)=2:goto moved
      if box(8)=1 and box(1)=1 then box(7)=2:goto moved
      if box(6)=1 and box(1)=1 then box(3)=2:goto moved
      if box(6)=1 and box(7)=1 then box(9)=2:goto moved
      if box(4)=1 and box(3)=1 then box(1)=2:goto moved
      if box(4)=1 and box(9)=1 then box(7)=2:goto moved
      if box(2)=1 and box(7)=1 then box(1)=2:goto moved
      if box(2)=1 and box(9)=1 then box(3)=2:goto moved
   endif
   for x=1 to 3
      if str$(box(1+(x-1)*3))+str$(box(2+(x-1)*3))+str$(box(3+(x-1)*3))="002" then box(1+(x-1)*3)=2:goto moved
      if str$(box(1+(x-1)*3))+str$(box(2+(x-1)*3))+str$(box(3+(x-1)*3))="020" then box(3+(x-1)*3)=2:goto moved
      if str$(box(1+(x-1)*3))+str$(box(2+(x-1)*3))+str$(box(3+(x-1)*3))="200" then box(1+(x-1)*3)=2:goto moved
   next x
   for y=1 to 3
      if str$(box(y))+str$(box(y+3))+str$(box(y+6))="002" then box(y)=2:goto moved
      if str$(box(y))+str$(box(y+3))+str$(box(y+6))="020" then box(y+6)=2:goto moved
      if str$(box(y))+str$(box(y+3))+str$(box(y+6))="200" then box(y+6)=2:goto moved
   next y
   for x=1 to 9
      if box(x)=0 then box(x)=2:goto moved
   next x

   moved:
   turn=0
   endif

   full=1
   for x=1 to 9
      if box(x)=0 then full=0
   next x

   if full=1 then goto draw

   line 100,100,100,400
   line 200,100,200,400
   line 300,100,300,400
   line 400,100,400,400
   line 100,100,400,100
   line 100,200,400,200
   line 100,300,400,300
   line 100,400,400,400

   sync
   cls
loop

win:
do
   for x=1 to 3
      for y=1 to 3
         if box((x-1)*3+y)=1
            line x*100,y*100,x*100+100,y*100+100
            line x*100,y*100+100,x*100+100,y*100
         endif
         if box((x-1)*3+y)=2
            circle x*100+50,y*100+50,45
         endif
      next y
   next x

   line 100,100,100,400
   line 200,100,200,400
   line 300,100,300,400
   line 400,100,400,400
   line 100,100,400,100
   line 100,200,400,200
   line 100,300,400,300
   line 100,400,400,400

   text 20,20,"The Computer Wins!"

   sync
loop

draw:
do
   for x=1 to 3
      for y=1 to 3
         if box((x-1)*3+y)=1
            line x*100,y*100,x*100+100,y*100+100
            line x*100,y*100+100,x*100+100,y*100
         endif
         if box((x-1)*3+y)=2
            circle x*100+50,y*100+50,45
         endif
      next y
   next x

   line 100,100,100,400
   line 200,100,200,400
   line 300,100,300,400
   line 400,100,400,400
   line 100,100,400,100
   line 100,200,400,200
   line 100,300,400,300
   line 100,400,400,400

   text 20,20,"It's a Draw"

   sync
loop


This one is updated and has the bugs fixed and is set out neater and is remarked.

New Code
+ Code Snippet
rem ***********************
rem * NOUGHTS AND CROSSES *
rem ***********************
rem * By  Hamish McHaggis *
rem ***********************

rem *** This is a demo that is unbeatable hopefully and shows how to do simple AI in a game ***

rem Setup Stuff
sync on
ink rgb(255,255,255),0
dim box(9)

rem Restart label
start:
rem Reset variables and arrays
turn=0
players_go=0
for x=1 to 9
   box(x)=0
next x

rem Main loop
do
   rem Loop though all squares and fill appropriately
   for x=1 to 3
      for y=1 to 3
         rem If the mouse is clicked on a square, if it isn't filled then fill it
         if turn=0 and mousex()>x*100+60 and mousex()<x*100+160 and mousey()>y*100 and mousey()<y*100+100 and mouseclick()=1 and box((x-1)*3+y)=0 then box((x-1)*3+y)=1:turn=1:inc players_go
         rem Draw crosses
         if box((x-1)*3+y)=1
            line x*100+60,y*100,x*100+160,y*100+100
            line x*100+60,y*100+100,x*100+160,y*100
         endif
         rem Draw noughts
         if box((x-1)*3+y)=2
            circle x*100+110,y*100+50,45
         endif
      next y
   next x
   center text 320,20,"NOUGHTS AND CROSSES"
   center text 320,40,"By Hamish McHaggis"

   rem If it is the computers turn
   if turn=1
   rem Loop though columns testing for winning combinations
   for x=1 to 3
      if str$(box(1+(x-1)*3))+str$(box(2+(x-1)*3))+str$(box(3+(x-1)*3))="022" then box(1+(x-1)*3)=2:goto win
      if str$(box(1+(x-1)*3))+str$(box(2+(x-1)*3))+str$(box(3+(x-1)*3))="202" then box(2+(x-1)*3)=2:goto win
      if str$(box(1+(x-1)*3))+str$(box(2+(x-1)*3))+str$(box(3+(x-1)*3))="220" then box(3+(x-1)*3)=2:goto win
   next x
   rem Loop though rows testing for winning combinations
   for y=1 to 3
      if str$(box(y))+str$(box(y+3))+str$(box(y+6))="022" then box(y)=2:goto win
      if str$(box(y))+str$(box(y+3))+str$(box(y+6))="202" then box(y+3)=2:goto win
      if str$(box(y))+str$(box(y+3))+str$(box(y+6))="220" then box(y+6)=2:goto win
   next y
   rem Test for winning combinations diagonally
   if str$(box(1))+str$(box(5))+str$(box(9))="022" then box(1)=2:goto win
   if str$(box(1))+str$(box(5))+str$(box(9))="202" then box(5)=2:goto win
   if str$(box(1))+str$(box(5))+str$(box(9))="220" then box(9)=2:goto win
   if str$(box(3))+str$(box(5))+str$(box(7))="022" then box(3)=2:goto win
   if str$(box(3))+str$(box(5))+str$(box(7))="202" then box(5)=2:goto win
   if str$(box(3))+str$(box(5))+str$(box(7))="220" then box(7)=2:goto win

   rem Loop though columns testing for blocking combinations
   for x=1 to 3
      if str$(box(1+(x-1)*3))+str$(box(2+(x-1)*3))+str$(box(3+(x-1)*3))="011" then box(1+(x-1)*3)=2:goto moved
      if str$(box(1+(x-1)*3))+str$(box(2+(x-1)*3))+str$(box(3+(x-1)*3))="101" then box(2+(x-1)*3)=2:goto moved
      if str$(box(1+(x-1)*3))+str$(box(2+(x-1)*3))+str$(box(3+(x-1)*3))="110" then box(3+(x-1)*3)=2:goto moved
   next x
   rem Loop though rows testing for blocking combinations
   for y=1 to 3
      if str$(box(y))+str$(box(y+3))+str$(box(y+6))="011" then box(y)=2:goto moved
      if str$(box(y))+str$(box(y+3))+str$(box(y+6))="101" then box(y+3)=2:goto moved
      if str$(box(y))+str$(box(y+3))+str$(box(y+6))="110" then box(y+6)=2:goto moved
   next y
   rem Test for blocking combinations diagonally
   if str$(box(1))+str$(box(5))+str$(box(9))="011" then box(1)=2:goto moved
   if str$(box(1))+str$(box(5))+str$(box(9))="101" then box(5)=2:goto moved
   if str$(box(1))+str$(box(5))+str$(box(9))="110" then box(9)=2:goto moved
   if str$(box(3))+str$(box(5))+str$(box(7))="011" then box(3)=2:goto moved
   if str$(box(3))+str$(box(5))+str$(box(7))="101" then box(5)=2:goto moved
   if str$(box(3))+str$(box(5))+str$(box(7))="110" then box(7)=2:goto moved

   rem If there are no winning or blocking combinations then test other options
   rem If player has had 1 go and hasn't placed in the middle then place in the middle otherwise place in a corner
   if players_go=1
      if box(5)=1 then box(3)=2:goto moved:else:box(5)=2:goto moved
   endif
   rem If player has had 2 gos then test other combinations
   if players_go=2
      rem Test the middle side, left other side possibility (see bottom for details)
      if box(8)=1 and box(3)=1 then box(9)=2:goto moved
      if box(8)=1 and box(1)=1 then box(7)=2:goto moved
      if box(6)=1 and box(1)=1 then box(3)=2:goto moved
      if box(6)=1 and box(7)=1 then box(9)=2:goto moved
      if box(4)=1 and box(3)=1 then box(1)=2:goto moved
      if box(4)=1 and box(9)=1 then box(7)=2:goto moved
      if box(2)=1 and box(7)=1 then box(1)=2:goto moved
      if box(2)=1 and box(9)=1 then box(3)=2:goto moved
      rem Test middle, perpendicular sides possibility (see bottom for details)
      if box(2)=1 and box(6)=1 then box(3)=2:goto moved
      if box(2)=1 and box(4)=1 then box(1)=2:goto moved
      if box(6)=1 and box(8)=1 then box(9)=2:goto moved
      if box(4)=1 and box(8)=1 then box(7)=2:goto moved
   endif
   rem If there aren't any defensive or offensive moves available then test for other moves
   rem Loop through columns for open columns to place in
   for x=1 to 3
      if str$(box(1+(x-1)*3))+str$(box(2+(x-1)*3))+str$(box(3+(x-1)*3))="002" then box(1+(x-1)*3)=2:goto moved
      if str$(box(1+(x-1)*3))+str$(box(2+(x-1)*3))+str$(box(3+(x-1)*3))="020" then box(3+(x-1)*3)=2:goto moved
      if str$(box(1+(x-1)*3))+str$(box(2+(x-1)*3))+str$(box(3+(x-1)*3))="200" then box(1+(x-1)*3)=2:goto moved
   next x
   rem Loop through rows for open rows to place in
   for y=1 to 3
      if str$(box(y))+str$(box(y+3))+str$(box(y+6))="002" then box(y)=2:goto moved
      if str$(box(y))+str$(box(y+3))+str$(box(y+6))="020" then box(y+6)=2:goto moved
      if str$(box(y))+str$(box(y+3))+str$(box(y+6))="200" then box(y+6)=2:goto moved
   next y
   rem If there are none of the above options then loop through all squares and place in the first one available
   for x=1 to 9
      if box(x)=0 then box(x)=2:goto moved
   next x

   rem Label for computer to go to when it's made it's move
   moved:
   rem Turn computer's go off
   turn=0
   endif

   rem Test to see if the grid is full
   full=1
   for x=1 to 9
      if box(x)=0 then full=0
   next x
   rem If the grid is full then declare a draw (winning is impossible, hopefully)
   if full=1 then goto draw

   rem Draw grid
   line 160,100,160,400
   line 260,100,260,400
   line 360,100,360,400
   line 460,100,460,400
   line 160,100,460,100
   line 160,200,460,200
   line 160,300,460,300
   line 160,400,460,400

   rem Refresh and loop
   sync
   cls
loop

rem Display stuff for winning
win:
do
   rem Draw crosses and noughts
   for x=1 to 3
      for y=1 to 3
         rem Draw crosses
         if box((x-1)*3+y)=1
            line x*100+60,y*100,x*100+160,y*100+100
            line x*100+60,y*100+100,x*100+160,y*100
         endif
         rem Draw noughts
         if box((x-1)*3+y)=2
            circle x*100+110,y*100+50,45
         endif
      next y
   next x

   rem Draw grid
   line 160,100,160,400
   line 260,100,260,400
   line 360,100,360,400
   line 460,100,460,400
   line 160,100,460,100
   line 160,200,460,200
   line 160,300,460,300
   line 160,400,460,400

   center text 320,20,"NOUGHTS AND CROSSES"
   center text 320,40,"By Hamish McHaggis"
   center text 320,220,"The Computer Wins!"
   center text 320,240,"Press Return to Restart"

   if returnkey()=1 then goto start
   sync
   cls
loop

rem Display stuff for drawing
draw:
do
   rem Draw crosses and noughts
   for x=1 to 3
      for y=1 to 3
         rem Draw crosses
         if box((x-1)*3+y)=1
            line x*100+60,y*100,x*100+160,y*100+100
            line x*100+60,y*100+100,x*100+160,y*100
         endif
         rem Draw noughts
         if box((x-1)*3+y)=2
            circle x*100+110,y*100+50,45
         endif
      next y
   next x

   rem Draw grid
   line 160,100,160,400
   line 260,100,260,400
   line 360,100,360,400
   line 460,100,460,400
   line 160,100,460,100
   line 160,200,460,200
   line 160,300,460,300
   line 160,400,460,400

   center text 320,20,"NOUGHTS AND CROSSES"
   center text 320,40,"By Hamish McHaggis"
   center text 320,220,"It's a Draw"
   center text 320,240,"Press Return to Restart"

   if returnkey()=1 then goto start
   sync
   cls
loop
Posted: 23rd Mar 2003 17:57
LOL
Posted: 23rd Mar 2003 18:06
LOL, nice one Hamish you just started a new challenge thread, instead of coding a game in 20 lines or less, code games which have people pulling their hair out trying to win, LOL. maybe Rich might take an interest in a new thread like this, hehe. The AI challenge or whatever
Posted: 23rd Mar 2003 18:20
Ha Ha! I tried to make it 20 lines but gave up when I saw that I had 4 lines to squeeze almost half of the code into!
Posted: 23rd Mar 2003 18:28
i did it hahahahahahahahahahahahahahaha

and heres the screenie to prove it
Posted: 23rd Mar 2003 19:32
Cool screene,

there is just X.

Maby you might want to repost it.

Cheers.
Posted: 23rd Mar 2003 19:36
Ha Ha! I can win for real, better get that code fixed. Here is the order you have to do it in to win...

middle bottom, right middle, right bottom, left bottom.

I'll have it fixed in a jiffy though!
Posted: 23rd Mar 2003 19:48
yeh hammish is right too easy too work out and cheat
Posted: 23rd Mar 2003 20:26
Winning is no longer an option! check top of page for updated code.
Posted: 23rd Mar 2003 20:38
Hehe..Maybe you should make a 3D version, with a big plushy X and O's . The more "points" you get, the more "cheats" or w/e you can buy !
Posted: 23rd Mar 2003 20:47
I should make different modes lol!

Chalk mode
Fridge Magnet Mode
Back of Maths Book Mode

Posted: 24th Mar 2003 22:08
A game you cannot loose...
+ Code Snippet
rem ***********************
rem * NOUGHTS AND CROSSES *
rem ***********************
rem * By  Hamish McHaggis
rem * edited by a dude
rem ***********************

rem *** This is a demo that is unbeatable hopefully and shows how to do simple AI in a game ***

rem Setup Stuff
sync on
ink rgb(255,255,255),0
dim box(9)

rem Restart label
start:
rem Reset variables and arrays
turn=0
players_go=0
for x=1 to 9
   box(x)=0
next x

rem Main loop
do
   rem Loop though all squares and fill appropriately
   for x=1 to 3
      for y=1 to 3
         rem If the mouse is clicked on a square, if it isn't filled then fill it
         if turn=0 and mousex()>x*100+60 and mousex()<x*100+160 and mousey()>y*100 and mousey()<y*100+100 and mouseclick()=1 and box((x-1)*3+y)=0 then box((x-1)*3+y)=1:turn=1:inc players_go
         rem Draw crosses
         if box((x-1)*3+y)=1
            line x*100+60,y*100,x*100+160,y*100+100
            line x*100+60,y*100+100,x*100+160,y*100
         endif
         rem Draw noughts
         if box((x-1)*3+y)=2
            circle x*100+110,y*100+50,45
         endif
      next y
   next x
   center text 320,20,"NOUGHTS AND CROSSES"
   center text 320,40,"By Hamish McHaggis"

   rem If it is the computers turn
   if turn=1
   rem Loop though columns testing for winning combinations
   for x=1 to 3
      
   next x
   rem Loop though rows testing for winning combinations
   for y=1 to 3
      if str$(box(y))+str$(box(y+3))+str$(box(y+6))="2" then box(y)=2:goto win
      if str$(box(y))+str$(box(y+3))+str$(box(y+6))="2" then box(y+3)=2:goto win
      if str$(box(y))+str$(box(y+3))+str$(box(y+6))="0" then box(y+6)=2:goto win
   next y
   rem Test for winning combinations diagonally
   if str$(box(1))+str$(box(5))+str$(box(9))="022" then box(1)=2:goto win
   if str$(box(1))+str$(box(5))+str$(box(9))="202" then box(5)=2:goto win
   if str$(box(1))+str$(box(5))+str$(box(9))="220" then box(9)=2:goto win
   if str$(box(3))+str$(box(5))+str$(box(7))="022" then box(3)=2:goto win
   if str$(box(3))+str$(box(5))+str$(box(7))="202" then box(5)=2:goto win
   if str$(box(3))+str$(box(5))+str$(box(7))="220" then box(7)=2:goto win

   rem Loop though columns testing for blocking combinations
   for x=1 to 3
      if str$(box(1+(x-1)*3))+str$(box(2+(x-1)*3))+str$(box(3+(x-1)*3))="011" then box(1+(x-1)*3)=2:goto moved
      if str$(box(1+(x-1)*3))+str$(box(2+(x-1)*3))+str$(box(3+(x-1)*3))="101" then box(2+(x-1)*3)=2:goto moved
      if str$(box(1+(x-1)*3))+str$(box(2+(x-1)*3))+str$(box(3+(x-1)*3))="110" then box(3+(x-1)*3)=2:goto moved
   next x
   rem Loop though rows testing for blocking combinations
   for y=1 to 3
   
   next y
   rem Test for blocking combinations diagonally
 

   rem If there are no winning or blocking combinations then test other options
   rem If player has had 1 go and hasn't placed in the middle then place in the middle otherwise place in a corner
   if players_go=1
      if box(5)=1 then box(3)=2:goto moved:else:box(5)=2:goto moved
   endif
   rem If player has had 2 gos then test other combinations
   if players_go=2
      rem Test the middle side, left other side possibility (see bottom for details)

   rem If there aren't any defensive or offensive moves available then test for other moves
   endif
rem Loop through columns for open columns to place in
   for x=1 to 3
      
   next x
   rem Loop through rows for open rows to place in
   for y=1 to 3
      if str$(box(y))+str$(box(y+3))+str$(box(y+6))="002" then box(y)=2:goto moved
      if str$(box(y))+str$(box(y+3))+str$(box(y+6))="020" then box(y+6)=2:goto moved
      if str$(box(y))+str$(box(y+3))+str$(box(y+6))="200" then box(y+6)=2:goto moved
   next y
   rem If there are none of the above options then loop through all squares and place in the first one available
   for x=1 to 9
      if box(x)=0 then box(x)=2:goto moved
   next x

   rem Label for computer to go to when it's made it's move
   moved:
   rem Turn computer's go off
   turn=0
   endif

   rem Test to see if the grid is full
   full=1
   for x=1 to 9
      if box(x)=0 then full=0
   next x
   rem If the grid is full then declare a draw (winning is impossible, hopefully)
   if full=1 then goto draw

   rem Draw grid
   line 160,100,160,400
   line 260,100,260,400
   line 360,100,360,400
   line 460,100,460,400
   line 160,100,460,100
   line 160,200,460,200
   line 160,300,460,300
   line 160,400,460,400

   rem Refresh and loop
   sync
   cls
loop

rem Display stuff for winning
win:
do
   rem Draw crosses and noughts
   for x=1 to 3
      for y=1 to 3
         rem Draw crosses
         if box((x-1)*3+y)=1
            line x*100+60,y*100,x*100+160,y*100+100
            line x*100+60,y*100+100,x*100+160,y*100
         endif
         rem Draw noughts
         if box((x-1)*3+y)=2
            circle x*100+110,y*100+50,45
         endif
      next y
   next x

   rem Draw grid
   line 160,100,160,400
   line 260,100,260,400
   line 360,100,360,400
   line 460,100,460,400
   line 160,100,460,100
   line 160,200,460,200
   line 160,300,460,300
   line 160,400,460,400

   center text 320,20,"NOUGHTS AND CROSSES"
   center text 320,40,"By Hamish McHaggis"
   center text 320,220,"The Computer Wins!"
   center text 320,240,"Press Return to Restart"

   if returnkey()=1 then goto start
   sync
   cls
loop

rem Display stuff for drawing
draw:
do
   rem Draw crosses and noughts
   for x=1 to 3
      for y=1 to 3
         rem Draw crosses
         if box((x-1)*3+y)=1
            line x*100+60,y*100,x*100+160,y*100+100
            line x*100+60,y*100+100,x*100+160,y*100
         endif
         rem Draw noughts
         if box((x-1)*3+y)=2
            circle x*100+110,y*100+50,45
         endif
      next y
   next x

   rem Draw grid
   line 160,100,160,400
   line 260,100,260,400
   line 360,100,360,400
   line 460,100,460,400
   line 160,100,460,100
   line 160,200,460,200
   line 160,300,460,300
   line 160,400,460,400

   center text 320,20,"NOUGHTS AND CROSSES"
   center text 320,40,"By Hamish McHaggis"
   center text 320,220,"YOU WIN!!!"
   center text 320,240,"Press Return to Restart"

   if returnkey()=1 then goto start
   sync
   cls
loop
Posted: 24th Mar 2003 23:00
I lost! Ha!
Posted: 21st Apr 2003 3:48
just pick any boxes so that the compute goes to a diagonal and youll lose
Posted: 22nd Apr 2003 3:20
HEY! i made 1 just like that 1 but in text form.
and theres no possible way to win.
Posted: 30th Apr 2003 20:24
<EDIT>

Never mind
Posted: 3rd May 2003 15:38
d*mn! this game is fun!!
i'll always lose
how did you do that?
Posted: 6th May 2003 0:59
I first wrote the game and it didn't work, then I adjusted it so that it would make the right moves in any circumstance. I also played a lot of games of noughts and crosses with myself !

Just read the source code, it's remarked, it shouldn't be too hard to understand.