I have the following code which basically needs to add a list as an item to a greater list. So NewBoardsList should contain all the boards generated in the moves_generate_board function. The problem is that i get a False in Prolog. Any help ?
moves((Colour,_),Board,NewBoardsList):-
other_colour(Colour,OtherColour),
findall((X,Y,OtherColour,N),
(member((X,Y,OtherColour,N),Board),
threaten_by(Colour,(X,Y,OtherColour,N),Board)),
Options),
moves_generate_board(Options,Board,NewBoardsList).
moves_generate_board([],Board,BoardsList).
moves_generate_board([(X,Y,_,_)|T],Board,List):-
replace((X,Y,-,-),Board,NewBoard),
moves_generate_board(T,Board,[NewBoard|List]).