TicTacWin

By TheJH - uploaded on 2008-12-14      461 views (17 in the last 7 days)

Tags: game tic-tac-toe

This tic-tac-toe works with a very good engine that precalculates all available things that can happen, so you can't win aganist it.
Little bug: When the computer wins, the game goes on running.


Your browser is ignoring the <APPLET> tag.

Report this scenario as broken or inappropriate.

 

RHE_THS writes (on 2008-12-14):

I won...

mjrb4 writes (on 2008-12-14):

Bigger bug: your logic is incorrect here - you can win - try bottom left, top right, bottom right, bottom middle - that looks like a win to me!

There IS a way to make sure that the human can't win, but you have to be cleverer than just looping through all the possible things that can happen for that move, you have to stop the game getting into a situation where a win is inevitable (which is what happens in the above example.)

mjrb4 writes (on 2008-12-14):

If you get really stuck, you can have a look here at something I did a while back - http://mikkle.co.uk/content/naughts-and-crosses - it's a netbeans project that uses Swing rather than Greenfoot and the coding isn't the neatest, but the logic's all there and it (I think) works as it should - so you can't win that is ;)

 

haikal writes (on 2009-7-1):

where the source...???


If you want to leave a comment on this scenario, you must first log in.


The Greenfoot Network:  Greenfoot.org    Greenfoot Gallery   Greenfoot-Discuss

Our sponsors:

University of Kent Deakin University Sun Microsystems