Hey guys, I am interested into making a 3D tic tac toe game, but right now I am stuck.
I created a 3D string... like board[3][3][3].
and each time the user type in numbers between 0 to 2...and the computer does the same too.

I played a few 3dTTT game on the internet and I am shocked about how complicated they can get to...
I am trying to write out all the possibilities right now which will take up about 189 lines...
is there an efficient logic about it? I've seen people doing for loops but I don't really get it...
Thank you.

I would suggest you read up on this, and practice on a 2D TTT to begin with.
http://en.wikipedia.org/wiki/Minimax

And yes, it's all about loops, and not copy/pasting the same code 200 times.

> I am trying to write out all the possibilities right now which will take up about 189 lines.
Wait until you get to something like chess. You're going to need a much bigger universe.
http://en.wikipedia.org/wiki/Shannon_number

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.