Implement counter prolog -
I am developing a board game in PROLOG and to make the interface more entertaining for the user, I decided to add A grid (0-> 4) with the coordinates as shown below: 0 1 2 3 4 --------- 0 | X x x x x 1 X o o o 2 O x o x x3 X x oo4 O x x x After developing some code, I came up with an issue about the counter for vertical coordinates when I hit the counter index + 1 , Then the status quits immediately after applying the rule given below: printgrid: -% writes only horizontal grid ('\ t (write), Write (0), write (''), write (1), write (''), write (2), write (''), write (3), write (''), write (4), nl , Type ('\ t'), Write ('------------------'), nl printbauer ([head | tail]): - index = 0, index index + 1,% stops here - ---------- Write (''), write (index), write ('|'), write (''), print rou (head), printbauer (tail). PrintBoard ([]) Print Rou ([Head | Tail]): - Write (Head), Write (''), Pri...