You are not logged in.
Pages: 1
Offline
UPDATE: I fixed something, it just doesn't play quite as I would expect. I think that is a problem that it a property of my algorithim.
You see, it doesn't choose the same move for all the different rotations when there is symmetry involved, which sort of makes sense to me.
All and all though, you should be able to compile this and play it just fine . . . I think.
Offline
/* This doesn't seem to work, there is always at least 1 cmd line arg for some reason
if (argc != 0)
{ printf ("WARNING: %d command line arguement(s) ignored!n", argc); }
else
{ printf ("TEST"); }
*/
The reason why there is always at least one command line argument is because the name of the executable is counted.
For example, if you ran your program like this:
./tic-tac-toe foo bar
Then:
argc == 3
argv[0] == tic-tac-toe
argv[1] == foo
argv[2] == bar
-gz
yes | /dev/mem
Offline
The reason why there is always at least one command line argument is because the name of the executable is counted.
For example, if you ran your program like this:
./tic-tac-toe foo bar
Then:
argc == 3
argv[0] == tic-tac-toe
argv[1] == foo
argv[2] == bar-gz
Thanks, I did not know that until now.
Offline
For example, if you ran your program like this:
./tic-tac-toe foo bar
Then:
argc == 3
argv[0] == tic-tac-toe
argv[1] == foo
argv[2] == bar
Technically, it'd be the full command line:
foo/tic-tac-toe
argc == 1
argv[0] == "foo/tic-tac-toe"
In your example, argv[0] would ne "./tic-tac-toe"
Offline
Pages: 1