This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

Krendil
Krendil presents ...

2009/1/24

nDOX

You can use this to play noughts and crosses (tic tac toe)
in any amount of dimensions (right now, only 4 fit on the screen) of any size
(you don't really want to go above 4 or 5). Please make more AI's for this!
If we get enough, there will be a tournament, but we need at least 3 more.

UPDATE 1/2/09:
No noticable changes, but I did get an n-dimensional coordinate system working.

UPDATE 2/2/09:
Same as last time, but now the coordinate system really does work

UPDATE 9/2/09:
Now with win detection! When someone wins, the outlines of the winning cells should turn red.

UPDATE 9/2/09 again:
This is not a double post - I added ai support. No actual ai yet, but feel free to make your own.
Just implement the AI interface and edit lines 45 or 46 in GameKeeper and line 27 in NDOXWorld.
Don't forget to share your ai's!

UPDATE 12/02/09:
Now with an AI!
Optimised some stuff.
Next up: GUI with grid size and ai chooser.

UPDATE 16/02/09:
Added GUI with AI and grid size chooser.
Ability to import custom AIs from .class files! Please use correct constructor as commented in AI interface.
WARNING: Remember not to start a game with 0 dimensions!

UPDATE 27/03/09:
Ack, finally got around to fixing some gui bugs,
and added new, smarter ai. I guess this will be as close as it gets to being finished.

6626 views / 13 in the last 7 days

2 votes | 0 in the last 7 days

Tags: game with-source tic-tac-toe noughts and crosses ai gui

This scenario is a member of: Reusable actors & support classes


open in greenfoot

There is no HTML 5 translation of this scenario available.
View legacy version (requires Java plugin)

This scenarios uses Java features that are not available for use after conversion to HTML 5. Please try the legacy version, which requires the Java plugin to be installed.

A new version of this scenario was uploaded on Mon Feb 09 12:27:37 UTC 2009
A new version of this scenario was uploaded on Mon Feb 09 13:06:34 UTC 2009
A new version of this scenario was uploaded on Thu Feb 12 11:25:47 UTC 2009
A new version of this scenario was uploaded on Mon Feb 16 14:33:20 UTC 2009
mjrb4mjrb4

2009/3/7

Perhaps it'd be good if there was some functionality stopping the user from selecting any number of dimensions and length <1?
NintoNinto

2009/3/20

I'm using a newer version of greenfoot and it can't find the method 'Arrays.copyOf(coordinates, coordinates+1)' line 60 in the code of Cell.
NintoNinto

2009/3/20

where did you find that?
KrendilKrendil

2009/3/21

It's in java.util.Arrays. Make sure you have the latest version of java, as that method was only added in version 1.6. (Man, I really need to finish this.)
A new version of this scenario was uploaded on Fri Mar 27 15:44:04 UTC 2009
RHINO_Mk.IIRHINO_Mk.II

2009/6/4

Muah ha haaaa I beat your trap spotter AI... You'll have to do better than that to defeat the human mind! (Of course, my turns took longer.. ^^)

See all comments

Want to leave a comment? You must first log in.

Who likes this?

nightwingx13 Yoinkinator