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

%%%% facts

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

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

villain(mojo-jojo).
  
fightsWith(buttercup,fist).
fightsWith(blossom,brain).
fightsWith(bubbles,cat_videos).
fightsWith(leo,katana).
fightsWith(michelangelo,nunchucks).


fightsWith(mojo-jojo,brain).

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

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

pmon(squirtle). 
color(squirtle,blue).
fightsWith(squirtle,bubbles).

pmon(magikarp). 
color(magikarp,red).
fightsWith(magikarp,tail).


pmon(pikachu).
hero(pikachu).
villain(meowth).
color(pikachu,yellow).
pmon(meowth).
color(meowth,black).
fightsWith(pikachu,tail).

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

% Make a rule: all  ppg,tmnt are heroes  

  
hero(C) :- ppg(C).
hero(C) :- tmnt(C).

snazzyHero(C) :- hero(C), color(C,blue).

bothRed(C1,C2) :- color(C1,red), color(C2,red), C1 \= C2.
  
clash(C1,C2) :- color(C1, K ), color(C2, K). 
  
  
% Make a rule: two clash, if they have the same fave-color.
% query: Do blossom, .. clash?
% Find all clashes w/ blossom.
% Find all clashes.
% find all clashes with a tmnt.

  
  
  
  
  
  
  
  
  
  
  
  
