2009-12-06

New XO game

In my university I had to create another XO game (previous was Yatzee), but this time using PROLOG. I used GNU prolog (gprolog), so if you'll want to test it you will have to obtain this package from your Linux repository.

Game controls are very simple:

 Main:

start_game. - start game in 10x10 field.
Goal is to have 5 figures in line.
put( X, Y ). - put your figure into X:Y

Additional:

start_game( X, Y, Z ). - start game in (X-1)x(X-1) field.
Goal is Y. Forecast depth is Z.
end_game. - end game.
put_for_pc( X, Y ). - put figure for pc into X:Y.
print_table. - print game table into console.
halt. - turn program off.

You can find my source code here. Remember, I am not responsible for anything that might happen with that program. It should work fine, but I do not take ANY responsibility for it. It is there for educational purposes only!