Sign in to follow this  
Followers 0
RazorTorque4X

C++ equivalent code fails ?

5 posts in this topic

This is a simple tic tac toe game, though not simple to say, cause it presents an AI that computer will use while making its move, here is the link to C++ code

Link

I tried to make AutoIt equivalent code for this, but it fails just in the last function, where computer calculates its move using AI.

Can any one tell me what is the error in that function.

Here is what I have done.

( See the file )

The code might be a bit long but the the error is just in _Evaluate() function rest is the GUI and other function.

Please can anyone help me point out the error. :(

Any little (or big) help is appreciated . :mellow:

tic tac ai.au3

Share this post


Link to post
Share on other sites



You have forgotten to change the brackets around the array elements in that function from () to [] for example $aAry(7) should be $aAry[7].


"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook

Share this post


Link to post
Share on other sites

Where did you get the impression that was C++!?


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

You have forgotten to change the brackets around the array elements in that function from () to [] for example $aAry(7) should be $aAry[7].

Hey, thanks for pointing out but there are still @errors.

The main @error is _Evaluate called with wrong no. of arguments.

But as far as I can see is that in the link too, first time there are no. args, but second time the function is called with RecursiveScore Argument.

So, that' the main problematic issue !

Or am I completely off the track...?:mellow:

Share this post


Link to post
Share on other sites

Where did you get the impression that was C++!?

Yeah, I am sorry but I had this code in C++ too ! :mellow:

Though the link is that of VBScript, I didn't really noticed at first and remembered that as I had this code for C++ so must be the one in link... :(

But I don't have that C++ code now....... Posted Image

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0