You haven't really given enough information for us to help you. If you can you should post your entire program. You should also explicitly mention the OS you are using (presumably Windows) and whether you want it to be able to run on other OS's (e.g., linux).

There's some possibly strange stuff in the code you've posted, although that depends on exactly what is going on in the code you didn't post. For instance, it doesn't seem to make sense to have a delay (Sleep) after the getMove calls if all those are doing is generating a random move and not actually moving anything on the screen.

If you don't want to publicize your code because you don't want other people to see it, you could put it on a file hosting site and PM me a link to it. TinyUpload seems pretty quick and easy, no sign-up required, 50MB max. Only people that you send a link to can access the file and it will be deleted if no one accesses it for 100 days.