% a simple testfile that loads student code file and runs a couple of tests.  Mimics
% what the testing script does. 

%The assumption is that this file is in same directory as students code file.


%%  Okay, let's start by wiping out any previously defined functors maybe left over 
%% from previous testing runs! 
:- abolish(ndelete/3),abolish(multn/3),abolish(link/2),abolish(connect/2).


%% Now load the student's program to prepare for test!

% CHANGE ME 
% Edit the below to specify your code file
:- assert(sfile('prog3_2016Soln.pl')). 


:- write('\nLOADING STUDENT PROGRAM: '), sfile(X), write(X),write('\n').
:- sfile(X),consult(X).

:- write('\nLoading up the social network given in assigment statement\n').
% Here are the LINK facts representing the social network given in assignment statement
link(doug, luther).  link(doug, kyle).
link(kyle, zach).  link(kyle, colter). link(kyle, garrett).
link(colter, brandon).  link(colter, dillon).
link(dillon, luther).  link(dillon, brandon).
link(zach, charles).
link(charles, garrett).  link(charles, colter).
link(garrett, rachel).


:- write('\n\nREADY TO TEST!\n').

%% Now we'll test the required functors. 
:- write('\nTesting ndelete(2,[a,b,c,d,e,f,g,h,i,j],OUT)\n'), ndelete(2,[a,b,c,d,e,f,g,h,i,j],OUT), write('Answer OUT= '), write(OUT).

:- write('\n\nTesting multn(5,3,OUT)\n'), multn(5,3,OUT), write('Answer OUT= '), write(OUT).



:- write('\n\nTesting connect(dillon,garrett)\n'), connect(dillon,garrett).


:- write('\n\n\nALL DONE TESTING!\n').



