
% get data from user for two rectangles, see if they overlap
chkOvr :- getR(First), getR(Second), overlap(First, Second).

% get data from user for two rectangles, see if they are separate
chkSep :- getR(First), getR(Second), separate(First, Second).

% get data from user for one rectangle, check if valid
getR(Rt) :-
    write("please enter the left, right, top, then bottom rectangle positions, "),
    write("e.g. 1. 3. 5. 2."), nl,
    read(L), read(R), read(T), read(B), !, rectangle(L,R,T,B), Rt = rectangle(L,R,T,B).


% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% need to add rules for rectangle, separate, and overlap

