Muchisimas Gracias lo que llevo es esto:
tablero([1,2,3,4,5,6,7,8]).
tablero([9,10,11,12,13,14,15,16]).
tablero([17,18,19,20,21,22,23,24]).
tablero([25,26,27,n,b,30,31,32]).
tablero([33,34,35,b,n,38,39,40]).
tablero([41,42,43,44,45,46,47,48]).
tablero([49,50,51,52,53,54,55,56]).
tablero([57,58,59,60,61,62,63,64]).
%tablero([0,0,0,0,0,0,0,0,
% 0,0,0,0,0,0,0,0,
% 0,0,0,0,0,0,0,0,
% 0,0,0,n,b,0,0,0,
% 0,0,0,b,n,0,0,0,
% 0,0,0,0,0,0,0,0,
% 0,0,0,0,0,0,0,0,
% 0,0,0,0,0,0,0,0]).
posicion(negro,1,1).
sobreescribir([_|L],X,1,[X|L]).
sobreescribir([X|L],E,P,[X|L2])
![Lengua :p :p](/foro/bakaritas/137.gif)
>1,Q is P-1,sobreescribir(L,E,Q,L2).
tablero(blanco,4,4).
tablero(negro,5,4).
tablero(negro,4,5).
tablero(blanco,5,5).
insertar(X,Y,Z):-Y<9,tablero(X,Y,Z).
cuenta(0,[]).
cuenta(N,[_|L]):-cuenta(M,L),N is M+1.
esta(X,[X|_]).
esta(X,[_|L]):-está(X,L).
gano(X):-esta(X,L),cuenta(Y,L).
pero ia me hice bolas :S