%%  You can run prolog at:   https://swish.swi-prolog.org/

%%%% facts

color(bubbles,blue).
color(buttercup,green).
color(blossom,red).

color(leonardo,blue).
color(rafael,red).
color(donatello,purple).
color(michelangelo,orange).

color(squirtle,blue).
color(magikarp,red).
color(pikachu,yellow).
color(meowth,black).


fightsWith(buttercup,fist).
fightsWith(blossom,brain).
fightsWith(bubbles,cat-videos).

fightsWith(leo,katana).
fightsWith(michelangelo,nunchucks).

fightsWith(magikarp,tail).
fightsWith(squirtle,bubbles).
fightsWith(pikachu,tail).

fightsWith(mojo-jojo,brain).

villain(mojo-jojo).
villain(meowth).

ppg(blossom).
ppg(buttercup).
ppg(bubbles).

tmnt(leonardo).
tmnt(rafael).
tmnt(donatello).
tmnt(michelangelo).

pmon(squirtle). 
pmon(magikarp). 
pmon(pikachu).
pmon(meowth).


/** <examples>  
?- color(bubbles, blue).
?- color(buttercup, blue).

?- color(bubbles, Kolor).
?- color(leonardo, Kolor).



%%% Find all ppg.
%%% Find all who like the color blue.
%%% Find all heroes.



*/

%%%%%%%%% rules


%%% Make a RULE: all ppg,tmnt are heroes  

hero(pikachu).



%%% Your turn: make a rule:
%%% snazzyHero/1: a hero whose color is blue.


%%% rule: bothRed/2: two heroes both like red



%%% rule: clash/2: two heroes have same color  
clash(C1,C2) :- color(C1, K ), color(C2, K). 

%%% This shows that it's okay
%%% to have variables that don't appear on left-hand-side:
%%% (like non-parameters -- local vars I guess:)


/** <examples>
% queries:
% - Do blossom and magikarp clash?
% - Find all clashes w/ blossom.
% - Find all clashes.
% - Find all clashes with a tmnt.

*/

