ve (5): - global_field (X1, X2, X3, X4, X5, X6, X7, X8, X9), X4 lt; gt; 0, X4=X6, X5=0,! ._ move (8): - global_field (X1, X2, X3, X4, X5 , X6, X7, X8, X9), X7 lt; gt; 0, X7=X9, X8=0,! ._ move (4): - global_field (X1, X2, X3, X4, X5, X6, X7, X8, X9), X1 lt; gt; 0, X1=X7, X4=0,! ._ move (5): - global_field (X1, X2, X3, X4, X5, X6, X7, X8, X9), X2 lt; gt; 0, X2=X8, X5=0,! ._ move (6): - global_field (X1, X2, X3, X4, X5, X6, X7, X8, X9), X3 lt; gt; 0, X3=X9, X6=0,! ._ move (5): - global_field (X1, X2, X3 , X4, X5, X6, X7, X8, X9), X1 lt; gt; 0, X1=X9, X5=0,! ._ move (5): - global_field (X1, X2, X3, X4, X5, X6, X7, X8, X9), X3 lt; gt; 0, X3=X7, X5=0,! ._ move (Xod): - random (8, TempXod), Xod=TempXod + 1,!. (1): - clearwindow , write ( New Game ), nl, _global_game_end (0), edit_global_field (0,0,0,0,0,0,0,0,0) ,, who_first (), nl, nl. (2):- clearwindow, write ( Score ), nl, show_score (), nl, nl, fail. (0): - !. (_).: - nl, repeat, ( Crosses and zeroes ), nl, nl, ( 1. New Game ), nl, ( 2. Score ), nl, ( 0. Exit ), nl, (= gt; ), readint ( Choice), (Choice), Choice=0 ..: - repeat.
%=============================================================================%(off),,(global_game_end(0), mydb), (global_field (0,0,0,0,0,0,0,0,0), mydb), (global_score (0,0), mydb),
menu